ue上 sceneColorMobile 在android 和ios上表现不同的问题

遇到个比较奇特的问题

一个值 (4.2,0,0) 在ios上和android都在sceneColorMobile写入这个值

ios mobile采样的时候这个值就变成1.8

android PC MAC是不变的

msaa resolve的问题 和msaaresolve无关

METAL_MSAA_HDR_DECODE

倾向是 ios上特殊encode的值不一样 要处理

SceneColor.rgb *= rcp(SceneColor.r*(-0.299)+SceneColor.g*(-0.587)+SceneColor*(-0.114)+1.0);

这是个颜色空间的亮度转换

经验证确实如此

 

//The input scene color has been encoded to non-linear space and needs to decode somewhere if MSAA enabled on Metal platform
bool bMetalMSAAHDRDecode = GSupportsShaderFramebufferFetch && IsMetalMobilePlatform(View.GetShaderPlatform()) && CVarMobileMSAA && CVarMobileMSAA->GetValueOnRenderThread() > 1;

 

这地方值的变化乍看很像srgb的转换 但因为sceneColorMObile 是rgba16float是不会有srgb格式的rt的 也没有shader里的转换

确实gamma的转换 写入的时候encode 读的时候要decode 和msaa无关

哇我好厉害(因为不用一个小时就修出来了,因为ue处理了这件事)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章