From f320d54f5c1c889f4c897bbacf1ece054e35b894 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:32:23 -0500 Subject: [PATCH] [OpenGL] Some shader compilers complain about using uint for mat4 array indexes > error C7011: implicit cast from "uint" to "int" So use an explicit cast. --- data/base/shaders/terrain_combined_high.frag | 2 +- data/base/shaders/terrain_combined_medium.frag | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/base/shaders/terrain_combined_high.frag b/data/base/shaders/terrain_combined_high.frag index ec2231376ac..c02b43d496b 100644 --- a/data/base/shaders/terrain_combined_high.frag +++ b/data/base/shaders/terrain_combined_high.frag @@ -91,7 +91,7 @@ out vec4 FragColor; vec3 getGroundUv(int i) { uint groundNo = fgrounds[i]; - return vec3(uvGround * groundScale[groundNo/4u][groundNo%4u], groundNo); + return vec3(uvGround * groundScale[int(groundNo/4u)][int(groundNo%4u)], groundNo); } vec3 getGround(int i) { diff --git a/data/base/shaders/terrain_combined_medium.frag b/data/base/shaders/terrain_combined_medium.frag index aa7b34bb83d..f0ef6a55253 100644 --- a/data/base/shaders/terrain_combined_medium.frag +++ b/data/base/shaders/terrain_combined_medium.frag @@ -91,7 +91,7 @@ out vec4 FragColor; vec3 getGroundUv(int i) { uint groundNo = fgrounds[i]; - return vec3(uvGround * groundScale[groundNo/4u][groundNo%4u], groundNo); + return vec3(uvGround * groundScale[int(groundNo/4u)][int(groundNo%4u)], groundNo); } vec3 getGround(int i) {