浏览代码

Fix issue with DecodeFromGbuffer missing PerceptualRoughness init

thanks Uygar
/main
sebastienlagarde 8 年前
当前提交
94ae3cb7
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 16
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/DisneyGGX.hlsl

16
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/DisneyGGX.hlsl


// This decode the Gbuffer in a BSDFData struct
BSDFData DecodeFromGBuffer(half4 inGBuffer0, half4 inGBuffer1, half4 inGBuffer2)
{
BSDFData data;
BSDFData output;
data.diffuseColor = inGBuffer0.rgb;
data.occlusion = inGBuffer0.a;
output.diffuseColor = inGBuffer0.rgb;
output.occlusion = inGBuffer0.a;
data.fresnel0 = inGBuffer1.rgb;
data.roughness = inGBuffer1.a;
output.fresnel0 = inGBuffer1.rgb;
output.roughness = inGBuffer1.a;
data.normalWS = UnpackNormalCartesian(inGBuffer2.rgb);
output.normalWS = UnpackNormalCartesian(inGBuffer2.rgb);
return data;
output.perceptualRoughness = SmoothnessToPerceptualRoughness(output.smoothness);
return output;
}
//-----------------------------------------------------------------------------

正在加载...
取消
保存