commit 3b804ad7683ba9afae3c98b1904a5af8cad311a9
parent 8d3a7209d7bc3cf95d154713509e16986003c729
Author: Michael Savage <mikejsavage@gmail.com>
Date: Wed, 8 Nov 2017 22:57:49 +0200
Use get_dither_noise in the clipmap shader
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/shaders/clipmap.glsl b/shaders/clipmap.glsl
@@ -86,10 +86,7 @@ void main() {
vec3 c = ( sunlight + ambient ) * ground;
- vec3 dither_noise = texture( blue_noise, gl_FragCoord.xy / textureSize( blue_noise, 0 ) ).xxx;
- dither_noise = ( dither_noise - vec3( 0.5 ) ) / 128.0;
-
- screen_colour = vec4( linear_to_srgb( apply_fog( c + dither_noise, length( v2f.view_position ) ) ), 1.0 );
+ screen_colour = vec4( linear_to_srgb( apply_fog( c + get_dither_noise(), length( v2f.view_position ) ) ), 1.0 );
}
#endif