浏览代码

Bad previous fix, sorry

/main
sebastienlagarde 8 年前
当前提交
fdf8f78f
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 12
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/DisneyGGX.hlsl

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


float occlusion;
float3 fresnel0;
float roughness;
float perceptualRoughness;
float perceptualRoughness;
float roughness;
};
//-----------------------------------------------------------------------------

// RT0: diffuse color (rgb), occlusion (a) - sRGB rendertarget
outGBuffer0 = half4(data.diffuseColor, data.occlusion);
// RT1: spec color (rgb), roughness (a) - sRGB rendertarget
outGBuffer1 = half4(data.specularColor, SmoothnessToRoughness(data.smoothness));
// RT1: spec color (rgb), perceptual roughness (a) - sRGB rendertarget
outGBuffer1 = half4(data.specularColor, SmoothnessToPerceptualRoughness(data.smoothness));
// RT2: normal (rgb), --unused, very low precision-- (a)
outGBuffer2 = half4(PackNormalCartesian(data.normal), 1.0f);

output.occlusion = inGBuffer0.a;
output.fresnel0 = inGBuffer1.rgb;
output.roughness = inGBuffer1.a;
output.perceptualRoughness = inGBuffer1.a;
output.perceptualRoughness = SmoothnessToPerceptualRoughness(output.smoothness);
output.roughness = PerceptualRoughnessToRoughness(output.perceptualRoughness);
return output;
}

正在加载...
取消
保存