From c726acd0467906afee74afb7051bb2e705e26565 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 23 Jul 2023 16:46:05 +0200 Subject: add chunk offset to rendering --- tiled.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tiled.glsl') 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); -- cgit v1.2.1