[Scummvm-git-logs] scummvm master -> cee0ecffc500a81c753c24abffd199f1ddc7ddef
chkuendig
noreply at scummvm.org
Fri May 9 20:39:26 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2067c6ab53 TWP: GLSL loop index cannot be compared with non-constant expression
cee0ecffc5 FREESCAPE: GLSL index expression must be constant and loop index cannot be compared with non-constant expression.
Commit: 2067c6ab5312596e96fc939d61ef5237fc919ae4
https://github.com/scummvm/scummvm/commit/2067c6ab5312596e96fc939d61ef5237fc919ae4
Author: Christian Kündig (christian at kuendig.info)
Date: 2025-05-09T22:39:22+02:00
Commit Message:
TWP: GLSL loop index cannot be compared with non-constant expression
Changed paths:
engines/twp/lighting.cpp
diff --git a/engines/twp/lighting.cpp b/engines/twp/lighting.cpp
index 691700ddd57..f91fdae3e95 100644
--- a/engines/twp/lighting.cpp
+++ b/engines/twp/lighting.cpp
@@ -61,7 +61,9 @@ void main(void) {
vec2 curPixelPosInLocalSpace = vec2(pixelPos.x, -pixelPos.y);
vec3 diffuse = vec3(0, 0, 0);
- for (int i = 0; i < u_numberLights; i++) {
+ for (int i = 0; i < 50; i++) {
+ if (i >= u_numberLights)
+ break;
vec2 lightVec = curPixelPosInLocalSpace.xy - u_lightPos[i].xy;
float coneValue = dot(normalize(-lightVec), u_coneDirection[i]);
if (coneValue >= u_coneCosineHalfConeAngle[i]) {
@@ -127,7 +129,9 @@ void main(void) {
vec2 curPixelPosInLocalSpace = vec2(pixelPos.x, -pixelPos.y);
vec3 diffuse = vec3(0, 0, 0);
- for (int i = 0; i < u_numberLights; i++) {
+ for (int i = 0; i < 50; i++) {
+ if (i >= u_numberLights)
+ break;
vec2 lightVec = curPixelPosInLocalSpace.xy - u_lightPos[i].xy;
float coneValue = dot(normalize(-lightVec), u_coneDirection[i]);
if (coneValue >= u_coneCosineHalfConeAngle[i]) {
Commit: cee0ecffc500a81c753c24abffd199f1ddc7ddef
https://github.com/scummvm/scummvm/commit/cee0ecffc500a81c753c24abffd199f1ddc7ddef
Author: Christian Kündig (christian at kuendig.info)
Date: 2025-05-09T22:39:22+02:00
Commit Message:
FREESCAPE: GLSL index expression must be constant and loop index cannot be compared with non-constant expression.
Changed paths:
engines/freescape/shaders/freescape_triangle.fragment
diff --git a/engines/freescape/shaders/freescape_triangle.fragment b/engines/freescape/shaders/freescape_triangle.fragment
index ae9a13a9eb4..20d3f7073b7 100644
--- a/engines/freescape/shaders/freescape_triangle.fragment
+++ b/engines/freescape/shaders/freescape_triangle.fragment
@@ -20,9 +20,17 @@ void main()
int bitIndex = int(mod(float(x), 8.));
// Get the stipple pattern byte
- int patternByte = stipple[byteIndex];
+ int patternByte = 0;
+ for (int i = 0; i < 128; i++) {
+ if (i == byteIndex) {
+ patternByte = stipple[i];
+ break;
+ }
+ }
- for (int i = 0; i < 7 - bitIndex; i++) {
+ for (int i = 0; i < 7; i++) {
+ if (i >= 7 - bitIndex)
+ break;
patternByte = patternByte / 2;
}
More information about the Scummvm-git-logs
mailing list