遇到个比较奇特的问题
一个值 (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处理了这件事)