mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Spacing fixes
This commit is contained in:
parent
88b21a72f1
commit
7993909fab
31 changed files with 82 additions and 83 deletions
|
@ -557,6 +557,6 @@ void main(void)
|
|||
- fogShadingParameter * length(eyeVec) / fogDistance, 0.0, 1.0);
|
||||
col = mix(skyBgColor, col, clarity);
|
||||
col = vec4(col.rgb, base.a);
|
||||
|
||||
|
||||
gl_FragColor = col;
|
||||
}
|
||||
|
|
|
@ -199,13 +199,13 @@ void main(void)
|
|||
vec3 nNormal = normalize(vNormal);
|
||||
cosLight = dot(nNormal, -v_LightDirection);
|
||||
|
||||
// Calculate normal offset scale based on the texel size adjusted for
|
||||
// Calculate normal offset scale based on the texel size adjusted for
|
||||
// curvature of the SM texture. This code must be change together with
|
||||
// getPerspectiveFactor or any light-space transformation.
|
||||
vec3 eyeToVertex = worldPosition - eyePosition + cameraOffset;
|
||||
// Distance from the vertex to the player
|
||||
float distanceToPlayer = length(eyeToVertex - v_LightDirection * dot(eyeToVertex, v_LightDirection)) / f_shadowfar;
|
||||
// perspective factor estimation according to the
|
||||
// perspective factor estimation according to the
|
||||
float perspectiveFactor = distanceToPlayer * xyPerspectiveBias0 + xyPerspectiveBias1;
|
||||
float texelSize = f_shadowfar * perspectiveFactor * perspectiveFactor /
|
||||
(f_textureresolution * xyPerspectiveBias1 - perspectiveFactor * xyPerspectiveBias0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue