Skip to content

Commit

Permalink
fix: ssgi use perceptual roughness instead of linear (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentalimbed authored Aug 15, 2024
1 parent 3cac49b commit aec4978
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions features/Screen Space GI/Shaders/ScreenSpaceGI/gi.cs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ void CalculateGI(
float3 bentNormal = viewspaceNormal;

#ifdef GI_SPECULAR
const float roughness2 = max(0.04, saturate(1 - FULLRES_LOAD(srcNormalRoughness, dtid, uv * frameScale, samplerLinearClamp).z)); // can't handle low roughness
const float roughness = sqrt(roughness2);
const float roughness = max(0.2, saturate(1 - FULLRES_LOAD(srcNormalRoughness, dtid, uv * frameScale, samplerLinearClamp).z)); // can't handle low roughness
#endif

for (uint slice = 0; slice < NumSlices; slice++) {
Expand Down

0 comments on commit aec4978

Please sign in to comment.