浏览代码

Merge pull request #143 from Unity-Technologies/dev_fix_mac_ios_color_issue

fix srgb color issue on mac/ios
/siyaoH-1.17-PlatformMessage
GitHub 4 年前
当前提交
f2db25bc
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      engine/src/shell/platform/unity/darwin/ios/unity_surface_manager.mm
  2. 2
      engine/src/shell/platform/unity/darwin/macos/unity_surface_manager.mm

2
engine/src/shell/platform/unity/darwin/ios/unity_surface_manager.mm


{
//Constants
const int ConstCVPixelFormat = kCVPixelFormatType_32BGRA;
const MTLPixelFormat ConstMetalViewPixelFormat = MTLPixelFormatBGRA8Unorm_sRGB;
const MTLPixelFormat ConstMetalViewPixelFormat = MTLPixelFormatBGRA8Unorm;
const GLuint ConstGLInternalFormat = GL_RGBA;
const GLuint ConstGLFormat = GL_BGRA_EXT;
const GLuint ConstGLType = GL_UNSIGNED_INT_8_8_8_8_REV;

2
engine/src/shell/platform/unity/darwin/macos/unity_surface_manager.mm


void* UnitySurfaceManager::CreateRenderTexture(size_t width, size_t height)
{
//Constants
const MTLPixelFormat ConstMetalViewPixelFormat = MTLPixelFormatBGRA8Unorm_sRGB;
const MTLPixelFormat ConstMetalViewPixelFormat = MTLPixelFormatBGRA8Unorm;
const int ConstCVPixelFormat = kCVPixelFormatType_32BGRA;
const GLuint ConstGLInternalFormat = GL_SRGB8_ALPHA8;
const GLuint ConstGLFormat = GL_BGRA;

正在加载...
取消
保存