Merge pull request #1626 from secondlife/1614-pbr-materials-exhibit-striationmoiré-patterns-in-specular-highlights

1614 pbr materials exhibit striationmoiré patterns in specular highlights
master
cosmic-linden 2024-06-04 09:03:27 -07:00 committed by GitHub
commit b97ee5df13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 10 deletions

View File

@ -142,18 +142,9 @@ vec2 getScreenCoordinate(vec2 screenpos)
}
vec4 getNorm(vec2 screenpos)
{
return texture(normalMap, screenpos.xy);
}
// return packedNormalEnvIntensityFlags since GBUFFER_FLAG_HAS_PBR needs .w
// See: C++: addDeferredAttachments(), GLSL: softenLightF
vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensity)
{
vec4 norm = texture(normalMap, screenpos.xy);
n = norm.xyz;
envIntensity = texture(emissiveRect, screenpos.xy).r;
norm.xyz = normalize(norm.xyz);
return norm;
}