From c9af4856e1849cb7cd97e6ac85fc2aa048c8fd1d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Apr 2024 23:43:50 +0100 Subject: Fix water texture wrapper in light of large position values --- gfx/gl/shaders/water.vs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx/gl') diff --git a/gfx/gl/shaders/water.vs b/gfx/gl/shaders/water.vs index 34c4700..58bf7b6 100644 --- a/gfx/gl/shaders/water.vs +++ b/gfx/gl/shaders/water.vs @@ -15,7 +15,7 @@ main() cos(waves + (position.x / 1000000) + (position.y / 8000)) * 300.0); FragPos = vec3(wpos.xy, position.z); - TexCoords = position.xy / 8192; + TexCoords = (position.xy / 8192) - (viewPoint.xy / 8192); gl_Position = viewProjection * vec4(wpos - viewPoint, 1.0); } -- cgit v1.2.3