diff options
author | davidovski <david@davidovski.xyz> | 2023-07-23 16:46:05 +0200 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-07-23 16:46:05 +0200 |
commit | c726acd0467906afee74afb7051bb2e705e26565 (patch) | |
tree | e8b9422ba926f09b85c229d51d5a99a077ea69e8 /tiled.glsl | |
parent | 0d78ec0e53d9824a029840e74bf0721ed2187e6a (diff) |
add chunk offset to rendering
Diffstat (limited to 'tiled.glsl')
-rw-r--r-- | tiled.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |