[Scummvm-git-logs] scummvm master -> 284340456470cbad7e04931ac20cc85c432e9b79

aquadran noreply at scummvm.org
Fri Oct 3 04:22:47 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:
2843404564 WINTERMUTE: Blend step in shadow voluume is no longer needed


Commit: 284340456470cbad7e04931ac20cc85c432e9b79
    https://github.com/scummvm/scummvm/commit/284340456470cbad7e04931ac20cc85c432e9b79
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-10-03T06:22:41+02:00

Commit Message:
WINTERMUTE: Blend step in shadow voluume is no longer needed

Changed paths:
    engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
    engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
    engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp


diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
index 2b0163b8468..66f79dcd997 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
@@ -62,7 +62,7 @@ bool ShadowVolumeOpenGL::render() {
 
 //////////////////////////////////////////////////////////////////////////
 bool ShadowVolumeOpenGL::renderToStencilBuffer() {
-	// Disable z-buffer writes (note: z-testing still occurs), and enable the
+	// Disable z-buffer/color writes (note: z-testing still occurs), and enable the
 	// stencil-buffer
 	glDepthMask(GL_FALSE);
 	glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
@@ -78,9 +78,6 @@ bool ShadowVolumeOpenGL::renderToStencilBuffer() {
 	glStencilFunc(GL_ALWAYS, 0x1, (GLuint)~0);
 
 	glShadeModel(GL_FLAT);
-	// Make sure that no pixels get drawn to the frame buffer
-	glEnable(GL_BLEND);
-	glBlendFunc(GL_ZERO, GL_ONE);
 
 	glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
 
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
index 8a7f7924294..45e3ddc5346 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
@@ -95,7 +95,7 @@ bool ShadowVolumeOpenGLShader::renderToStencilBuffer() {
 	_volumeShader->enableVertexAttribute("position", _shadowVolumeVertexBuffer, 3, GL_FLOAT, false, 12, 0);
 	_volumeShader->use(true);
 
-	// Disable z-buffer writes (note: z-testing still occurs), and enable the
+	// Disable z-buffer/color writes (note: z-testing still occurs), and enable the
 	// stencil-buffer
 	glDepthMask(GL_FALSE);
 	glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
@@ -109,10 +109,6 @@ bool ShadowVolumeOpenGLShader::renderToStencilBuffer() {
 	// renderstate is really not needed.
 	glStencilFunc(GL_ALWAYS, 0x1, (GLuint)~0);
 
-	// Make sure that no pixels get drawn to the frame buffer
-	glEnable(GL_BLEND);
-	glBlendFunc(GL_ZERO, GL_ONE);
-
 	glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
 
 	// Draw back-side of shadow volume in stencil/z only
diff --git a/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp b/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
index 19bad805978..1b28a294894 100644
--- a/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
+++ b/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
@@ -60,7 +60,7 @@ bool ShadowVolumeTinyGL::render() {
 
 //////////////////////////////////////////////////////////////////////////
 bool ShadowVolumeTinyGL::renderToStencilBuffer() {
-	// Disable z-buffer writes (note: z-testing still occurs), and enable the
+	// Disable z-buffer/color writes (note: z-testing still occurs), and enable the
 	// stencil-buffer
 	tglDepthMask(TGL_FALSE);
 	tglColorMask(TGL_FALSE, TGL_FALSE, TGL_FALSE, TGL_FALSE);
@@ -76,9 +76,6 @@ bool ShadowVolumeTinyGL::renderToStencilBuffer() {
 	tglStencilFunc(TGL_ALWAYS, 0x1, (TGLuint)~0);
 
 	tglShadeModel(TGL_FLAT);
-	// Make sure that no pixels get drawn to the frame buffer
-	tglEnable(TGL_BLEND);
-	tglBlendFunc(TGL_ZERO, TGL_ONE);
 
 	tglStencilOp(TGL_KEEP, TGL_KEEP, TGL_INCR);
 




More information about the Scummvm-git-logs mailing list