diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-01-06 01:31:22 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-01-06 01:31:22 +0000 |
commit | 0581125f438ac9c7a6126e402148d64765948452 (patch) | |
tree | 081ad47b23ed84d32ad7652495546e5d2f90f3f1 /gfx | |
parent | Add rendering support for spot lights (diff) | |
download | ilt-0581125f438ac9c7a6126e402148d64765948452.tar.bz2 ilt-0581125f438ac9c7a6126e402148d64765948452.tar.xz ilt-0581125f438ac9c7a6126e402148d64765948452.zip |
min/mag filter for shadow mapper depth map texture
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/gl/shadowMapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp index 5715c0e..325f7a0 100644 --- a/gfx/gl/shadowMapper.cpp +++ b/gfx/gl/shadowMapper.cpp @@ -16,8 +16,8 @@ ShadowMapper::ShadowMapper(const glm::ivec2 & s) : size {s} { glBindTexture(GL_TEXTURE_2D, depthMap); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, size.x, size.y, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); static constexpr glm::vec4 border {std::numeric_limits<float>::infinity()}; |