[Scummvm-git-logs] scummvm master -> 9ee175c85457b53071eef59130e209f2b81e1815
aquadran
noreply at scummvm.org
Fri Nov 14 21:40:41 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
9ee175c854 GRIM: EMI: Don't enable lighting when drawing shadows
Commit: 9ee175c85457b53071eef59130e209f2b81e1815
https://github.com/scummvm/scummvm/commit/9ee175c85457b53071eef59130e209f2b81e1815
Author: Christian Krause (chkr at plauener.de)
Date: 2025-11-14T22:40:38+01:00
Commit Message:
GRIM: EMI: Don't enable lighting when drawing shadows
- align shader renderer with standard opengl and do not use
the lighting shaders when drawing the actor's shadow
- this fixes the issue that the shadows in EMI, e.g.
in the bait shop or at Ozzie's house are drawn
too dark and with a color gradient
Changed paths:
engines/grim/gfx_opengl_shaders.cpp
engines/grim/gfx_opengl_shaders.h
diff --git a/engines/grim/gfx_opengl_shaders.cpp b/engines/grim/gfx_opengl_shaders.cpp
index 2f745136274..19169c6a3f2 100644
--- a/engines/grim/gfx_opengl_shaders.cpp
+++ b/engines/grim/gfx_opengl_shaders.cpp
@@ -990,10 +990,6 @@ void GfxOpenGLS::clearShadowMode() {
glDepthMask(GL_TRUE);
}
-bool GfxOpenGLS::isShadowModeActive() {
- return false;
-}
-
void GfxOpenGLS::setShadowColor(byte r, byte g, byte b) {
_shadowColorR = r;
_shadowColorG = g;
@@ -1058,7 +1054,7 @@ void GfxOpenGLS::drawEMIModelFace(const EMIModel* model, const EMIMeshFace* face
glEnable(GL_BLEND);
const EMIModelUserData *mud = (const EMIModelUserData *)model->_userData;
OpenGL::Shader *actorShader;
- if ((face->_flags & EMIMeshFace::kNoLighting) ? false : _lightsEnabled)
+ if ((face->_flags & EMIMeshFace::kNoLighting || isShadowModeActive()) ? false : _lightsEnabled)
actorShader = mud->_shaderLights;
else
actorShader = mud->_shader;
diff --git a/engines/grim/gfx_opengl_shaders.h b/engines/grim/gfx_opengl_shaders.h
index 54df9adda3c..5f4a1d2253c 100644
--- a/engines/grim/gfx_opengl_shaders.h
+++ b/engines/grim/gfx_opengl_shaders.h
@@ -77,7 +77,6 @@ public:
void drawShadowPlanes() override;
void setShadowMode() override;
void clearShadowMode() override;
- bool isShadowModeActive() override;
void setShadowColor(byte r, byte g, byte b) override;
void getShadowColor(byte *r, byte *g, byte *b) override;
void destroyShadow(Shadow *shadow) override;
More information about the Scummvm-git-logs
mailing list