浏览代码

Remove the workaround for the PSSL compiler bug (it's been fixed)

/RenderPassXR_Sandbox
Evgenii Golubev 7 年前
当前提交
b51681c8
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 3
      Assets/ScriptableRenderPipeline/ShaderLibrary/AreaLighting.hlsl

3
Assets/ScriptableRenderPipeline/ShaderLibrary/AreaLighting.hlsl


float a = cosOmega * acos(x) - z; // y*ArcCos[-y*Sqrt[(1/x-1)/(1-y^2)]]-Sqrt[(1-y^2)*(x/(1-x))-y^2]*(1/x-1)
float b = atan(y); // ArcTan[Sqrt[(1-y^2)*(x/(1-x))-y^2]]
// Replacing max() with saturate() results in a 12 cycle SGPR forwarding stall on PS4.
return max(INV_PI * (a * sinSqSigma + b), 0); // (a/Pi)*x+(b/Pi)
return saturate(INV_PI * (a * sinSqSigma + b));
}
#endif
#endif

正在加载...
取消
保存