遇到個比較奇特的問題
一個值 (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處理了這件事)