diff options
author | ShadowNinja <shadowninja@minetest.net> | 2021-12-01 18:54:12 -0500 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2022-04-08 14:55:21 +0100 |
commit | 7993909fabce4f796ca67b5a8139936667de25df (patch) | |
tree | 2ff9368e3e370ac00e2ae9d17a08ec68b3e426d1 /client | |
parent | 88b21a72f18db6a94e58a8047c4dec6160327e73 (diff) | |
download | minetest-7993909fabce4f796ca67b5a8139936667de25df.tar.gz minetest-7993909fabce4f796ca67b5a8139936667de25df.tar.bz2 minetest-7993909fabce4f796ca67b5a8139936667de25df.zip |
Spacing fixes
Diffstat (limited to 'client')
-rw-r--r-- | client/shaders/nodes_shader/opengl_fragment.glsl | 2 | ||||
-rw-r--r-- | client/shaders/nodes_shader/opengl_vertex.glsl | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/client/shaders/nodes_shader/opengl_fragment.glsl b/client/shaders/nodes_shader/opengl_fragment.glsl index 4d0d107d1..fea350788 100644 --- a/client/shaders/nodes_shader/opengl_fragment.glsl +++ b/client/shaders/nodes_shader/opengl_fragment.glsl @@ -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; } diff --git a/client/shaders/nodes_shader/opengl_vertex.glsl b/client/shaders/nodes_shader/opengl_vertex.glsl index 935fbf043..8c7e27459 100644 --- a/client/shaders/nodes_shader/opengl_vertex.glsl +++ b/client/shaders/nodes_shader/opengl_vertex.glsl @@ -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); |