[Scummvm-git-logs] scummvm master -> 68f2d02b6d985d945d17378298aef25325107ec9
aquadran
noreply at scummvm.org
Mon Nov 4 15:49:06 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
68f2d02b6d WINTERMUTE: Minor cleanup
Commit: 68f2d02b6d985d945d17378298aef25325107ec9
https://github.com/scummvm/scummvm/commit/68f2d02b6d985d945d17378298aef25325107ec9
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2024-11-04T16:49:01+01:00
Commit Message:
WINTERMUTE: Minor cleanup
Changed paths:
engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
index 3a56f804959..f653bb31c91 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -193,8 +193,7 @@ bool BaseRenderOpenGL3D::setup3D(Camera3D *camera, bool force) {
glEnable(GL_LIGHTING);
glEnable(GL_ALPHA_TEST);
// WME uses 8 as a reference value and Direct3D expects it to be in the range [0, 255]
- // 8 / 255 ~ 0.0313
- glAlphaFunc(GL_GEQUAL, 0.0313f);
+ glAlphaFunc(GL_GEQUAL, 8 / 255.0f);
setAmbientLightRenderState();
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
index 5c33c013031..1886516fb97 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
@@ -191,8 +191,8 @@ bool BaseRenderOpenGL3DShader::setup3D(Camera3D *camera, bool force) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glEnable(GL_DEPTH_TEST);
- // this is 8 / 255, since 8 is the value used by WME DX
- _alphaRef = 8 / 255.f;
+ // WME uses 8 as a reference value and Direct3D expects it to be in the range [0, 255]
+ _alphaRef = 8 / 255.0f;
setAmbientLightRenderState();
More information about the Scummvm-git-logs
mailing list