[Scummvm-git-logs] scummvm master -> 734fae30daffec67213899f8ef0b081b91f07d1b

aquadran noreply at scummvm.org
Sun Jul 13 07:11:26 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:
734fae30da WINTERMUTE: W/A for the scene with the table in the laboratory.


Commit: 734fae30daffec67213899f8ef0b081b91f07d1b
    https://github.com/scummvm/scummvm/commit/734fae30daffec67213899f8ef0b081b91f07d1b
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-07-13T09:11:21+02:00

Commit Message:
WINTERMUTE: W/A for the scene with the table in the laboratory.

Switching to the flat shadows in particular scene,
presumably it's supposed to disable shadows. Instead, OpenGL draws
graphical glitches. Original DX version does not have this issue
due to rendering flat shadows differently.

Changed paths:
    engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
    engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp


diff --git a/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp b/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
index ec94c09b159..120144dd99a 100644
--- a/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
@@ -30,7 +30,7 @@
 #include "engines/wintermute/base/gfx/3deffect_params.h"
 #include "engines/wintermute/base/gfx/skin_mesh_helper.h"
 #include "engines/wintermute/base/base_game.h"
-#include "engines/wintermute/base/gfx/base_renderer3d.h"
+#include "engines/wintermute/base/base_engine.h"
 
 #include "graphics/opengl/system_headers.h"
 
@@ -162,6 +162,13 @@ bool XMeshOpenGL::renderFlatShadowModel(uint32 shadowColor) {
 	if (!_gameRef->_renderer3D->_camera)
 		return false;
 
+	// W/A for the scene with the table in the laboratory where the engine switches to flat shadows.
+	// Presumably, it's supposed to disable shadows.
+	// Instead, OpenGL draws graphical glitches.
+	// Original DX version does not have this issue due to rendering shadows differently.
+	if (BaseEngine::instance().getGameId() == "alphapolaris")
+		return false;
+
 	uint32 vertexSize = DXGetFVFVertexSize(_blendedMesh->getFVF()) / sizeof(float);
 	float *vertexData = (float *)_blendedMesh->getVertexBuffer().ptr();
 	if (vertexData == nullptr) {
diff --git a/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp
index a7cc146db2a..71d911965a3 100644
--- a/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp
@@ -31,6 +31,7 @@
 #include "engines/wintermute/base/gfx/skin_mesh_helper.h"
 #include "engines/wintermute/base/gfx/base_renderer3d.h"
 #include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
 
 #include "graphics/opengl/system_headers.h"
 
@@ -181,6 +182,13 @@ bool XMeshOpenGLShader::renderFlatShadowModel(uint32 shadowColor) {
 	if (!_gameRef->_renderer3D->_camera)
 		return false;
 
+	// W/A for the scene with the table in the laboratory where the engine switches to flat shadows.
+	// Presumably, it's supposed to disable shadows.
+	// Instead, OpenGL draws graphical glitches.
+	// Original DX version does not have this issue due to rendering shadows differently.
+	if (BaseEngine::instance().getGameId() == "alphapolaris")
+		return false;
+	
 	uint32 vertexSize = DXGetFVFVertexSize(_blendedMesh->getFVF()) / sizeof(float);
 	float *vertexData = (float *)_blendedMesh->getVertexBuffer().ptr();
 	if (vertexData == nullptr) {




More information about the Scummvm-git-logs mailing list