summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowStenciller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shadowStenciller.cpp')
-rw-r--r--gfx/gl/shadowStenciller.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gfx/gl/shadowStenciller.cpp b/gfx/gl/shadowStenciller.cpp
index 30a67a7..68b12ae 100644
--- a/gfx/gl/shadowStenciller.cpp
+++ b/gfx/gl/shadowStenciller.cpp
@@ -58,7 +58,8 @@ ShadowStenciller::renderStencil(const glTexture & stencil, const MeshBase & mesh
}
glUseProgram(shadowCaster);
glClear(GL_DEPTH_BUFFER_BIT);
- glViewport(0, 0, 256, 256);
+ const auto stencilSize = Texture::getSize(stencil);
+ glViewport(0, 0, stencilSize.x, stencilSize.y);
const auto & centre = mesh.getDimensions().centre;
const auto & size = mesh.getDimensions().size;
glUniform(viewProjectionLoc,