[colobot] 351/390: Transparent textures no longer cast shadows in transparent parts

Didier Raboud odyx at moszumanska.debian.org
Fri Jun 12 14:22:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit b033e35385c0cbd3636e1851b79a16cc41a245ba
Author: Tomasz Kapuściński <tomaszkax86 at gmail.com>
Date:   Mon May 11 18:00:02 2015 +0200

    Transparent textures no longer cast shadows in transparent parts
---
 src/graphics/engine/engine.cpp   | 2 ++
 src/graphics/opengl/gldevice.cpp | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 849b585..5009254 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3620,6 +3620,8 @@ void CEngine::RenderShadowMap()
         {
             EngineBaseObjTexTier& p2 = p1.next[l2];
 
+            SetTexture(p2.tex1, 0);
+
             for (int l3 = 0; l3 < static_cast<int>(p2.next.size()); l3++)
             {
                 EngineBaseObjLODTier& p3 = p2.next[l3];
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp
index 8380088..87ab61b 100644
--- a/src/graphics/opengl/gldevice.cpp
+++ b/src/graphics/opengl/gldevice.cpp
@@ -299,6 +299,7 @@ bool CGLDevice::Create()
 
     // Minimal depth bias to avoid Z-fighting
     //SetDepthBias(0.001f);
+    glAlphaFunc(GL_GREATER, 0.1f);
 
     // Set just to be sure
     glClearColor(0.0f, 0.0f, 0.0f, 0.0f);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list