[Scummvm-git-logs] scummvm master -> b3982d0d4ca3dbfce2e5dbc42a0c93ad0ca27f2b

klusark noreply at scummvm.org
Tue Nov 10 18:20:06 UTC 2026


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:
b3982d0d4c TINYGL: Fix depth losing precision when written


Commit: b3982d0d4ca3dbfce2e5dbc42a0c93ad0ca27f2b
    https://github.com/scummvm/scummvm/commit/b3982d0d4ca3dbfce2e5dbc42a0c93ad0ca27f2b
Author: Joel Teichroeb (joel at teichroeb.net)
Date: 2026-11-10T13:20:01-05:00

Commit Message:
TINYGL: Fix depth losing precision when written

writePixel took the depth as a float, which rounds the 30 bit value to
24 bits before it is stored. A triangle drawn again with TGL_EQUAL then
drew nothing, and with TGL_LEQUAL only about half of its pixels.

Assisted-by: Claude:claude-fable-5-2

Changed paths:
    graphics/tinygl/zbuffer.h


diff --git a/graphics/tinygl/zbuffer.h b/graphics/tinygl/zbuffer.h
index 25a46077e66..4a92156169c 100644
--- a/graphics/tinygl/zbuffer.h
+++ b/graphics/tinygl/zbuffer.h
@@ -435,7 +435,7 @@ private:
 	}
 
 	template <bool kEnableAlphaTest, bool kBlendingEnabled, bool kDepthWrite, bool kFogMode>
-	FORCEINLINE void writePixel(int pixel, byte aSrc, byte rSrc, byte gSrc, byte bSrc, float z, uint fog, byte fog_r, byte fog_g, byte fog_b) {
+	FORCEINLINE void writePixel(int pixel, byte aSrc, byte rSrc, byte gSrc, byte bSrc, uint z, uint fog, byte fog_r, byte fog_g, byte fog_b) {
 		if (kEnableAlphaTest) {
 			if (!checkAlphaTest(aSrc))
 				return;




More information about the Scummvm-git-logs mailing list