diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-07-07 20:10:24 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-07-07 20:10:24 +0100 |
commit | 425add81fc8718f1ac4fde48a71344cd332d5a58 (patch) | |
tree | 7f4bcbd89342b07d2faee1eb00f3f9b804ed5ac2 /game/scenary | |
parent | Merge branch 'imgui' (diff) | |
download | ilt-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.cpp | 5 |
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)); } } |