X-Git-Url: https://gitweb.ps.run/subsurface_scattering/blobdiff_plain/a0fdc6d882a1755d0b0607ba3d9bb55e7f8ac006..refs/heads/main:/shaders/frag_shadowmap.glsl diff --git a/shaders/frag_shadowmap.glsl b/shaders/frag_shadowmap.glsl index 9a15c7a..38a01b6 100644 --- a/shaders/frag_shadowmap.glsl +++ b/shaders/frag_shadowmap.glsl @@ -10,10 +10,10 @@ uniform vec3 lightPos; void main() { + // calculate distance in world coordinates float lightDist = length(lightPos - FragPos); - float c1 = mod(lightDist, 10); - float c2 = mod(lightDist/10, 10); - float c3 = mod(lightDist/100, 10); + float c1 = lightDist; + float c2 = lightDist; + float c3 = lightDist; FragColor = vec4(c1, c2, c3, 1); - //FragColor = vec4(LocalPos/10, 1); }