From 425add81fc8718f1ac4fde48a71344cd332d5a58 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Jul 2024 20:10:24 +0100 Subject: Add shadow shader which takes into account texture transparency --- game/scenary/foliage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'game/scenary/foliage.cpp') 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(count)); } } -- cgit v1.2.3