summaryrefslogtreecommitdiff
path: root/tiled.glsl
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-23 16:46:05 +0200
committerdavidovski <david@davidovski.xyz>2023-07-23 16:46:05 +0200
commitc726acd0467906afee74afb7051bb2e705e26565 (patch)
treee8b9422ba926f09b85c229d51d5a99a077ea69e8 /tiled.glsl
parent0d78ec0e53d9824a029840e74bf0721ed2187e6a (diff)
add chunk offset to rendering
Diffstat (limited to 'tiled.glsl')
-rw-r--r--tiled.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/tiled.glsl b/tiled.glsl
index 7fdf91e..a70e626 100644
--- a/tiled.glsl
+++ b/tiled.glsl
@@ -13,7 +13,7 @@ uniform sampler2D tilemapTexture;
uniform vec2 offset;
uniform float zoom;
uniform ivec2 atlasSize;
-uniform ivec2 mapSize;
+uniform ivec2 renderArea;
out vec4 finalColor;
@@ -68,7 +68,7 @@ void main() {
// get position in tiled world wow
ivec2 tilemapPos = ivec2(floor(uv));
- if (outBounds(uv, mapSize)) {
+ if (outBounds(uv, renderArea)) {
finalColor = none;
} else {
vec2 position = mod(uv, 1);