summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-04-07 23:43:50 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-04-07 23:43:50 +0100
commitc9af4856e1849cb7cd97e6ac85fc2aa048c8fd1d (patch)
tree1cb1de6865c0c35e2c35fcd6e2b5610b0eedd8ab
parentStripped down water vertex and simplified shaders (diff)
downloadilt-c9af4856e1849cb7cd97e6ac85fc2aa048c8fd1d.tar.bz2
ilt-c9af4856e1849cb7cd97e6ac85fc2aa048c8fd1d.tar.xz
ilt-c9af4856e1849cb7cd97e6ac85fc2aa048c8fd1d.zip
Fix water texture wrapper in light of large position values
-rw-r--r--gfx/gl/shaders/water.vs2
1 files changed, 1 insertions, 1 deletions
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);
}