summaryrefslogtreecommitdiff
path: root/game/scenary
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 20:10:24 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 20:10:24 +0100
commit425add81fc8718f1ac4fde48a71344cd332d5a58 (patch)
tree7f4bcbd89342b07d2faee1eb00f3f9b804ed5ac2 /game/scenary
parentMerge branch 'imgui' (diff)
downloadilt-425add81fc8718f1ac4fde48a71344cd332d5a58.tar.bz2
ilt-425add81fc8718f1ac4fde48a71344cd332d5a58.tar.xz
ilt-425add81fc8718f1ac4fde48a71344cd332d5a58.zip
Add shadow shader which takes into account texture transparency
Diffstat (limited to 'game/scenary')
-rw-r--r--game/scenary/foliage.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/game/scenary/foliage.cpp b/game/scenary/foliage.cpp
index c258b77..73d285f 100644
--- a/game/scenary/foliage.cpp
+++ b/game/scenary/foliage.cpp
@@ -35,7 +35,10 @@ void
Foliage::shadows(const ShadowMapper & mapper) const
{
if (const auto count = instances.size()) {
- mapper.dynamicPointInst.use();
+ mapper.dynamicPointInstWithTextures.use();
+ if (texture) {
+ texture->bind(GL_TEXTURE3);
+ }
bodyMesh->DrawInstanced(instanceVAO, static_cast<GLsizei>(count));
}
}