mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2026-10-10 05:03:04 +08:00
add impossible normal viewing angle mitigation for specular reflections
This commit is contained in:
@@ -342,6 +342,9 @@ vec3 specularReflections(
|
||||
mat3 basis = CoordBase(normal);
|
||||
vec3 viewDir = -playerPos*basis;
|
||||
|
||||
// impossible normal viewing angle mitigation.
|
||||
viewDir.z = abs(viewDir.z);
|
||||
|
||||
#if defined FORWARD_ROUGH_REFLECTION || defined DEFERRED_ROUGH_REFLECTION
|
||||
vec3 samplePoints = SampleVNDFGGX(viewDir, roughness, noise.xy);
|
||||
vec3 reflectedVector_L = basis * reflect(-normalize(viewDir), samplePoints);
|
||||
|
||||
Reference in New Issue
Block a user