From 5043f98e007582b30892dd12b76ac4de4b487b4b Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Tue, 17 Oct 2023 22:24:44 +0300 Subject: [PATCH] Fix shader type mismatches (#311) * Update opengl_fragment_shader.frag * Update opengl_vertex_shader.vert --- src/host_shaders/opengl_fragment_shader.frag | 4 ++-- src/host_shaders/opengl_vertex_shader.vert | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/host_shaders/opengl_fragment_shader.frag b/src/host_shaders/opengl_fragment_shader.frag index 2fd4146a4..a78f42b88 100644 --- a/src/host_shaders/opengl_fragment_shader.frag +++ b/src/host_shaders/opengl_fragment_shader.frag @@ -32,7 +32,7 @@ uniform sampler1DArray u_tex_lighting_lut; uniform uint u_picaRegs[0x200 - 0x48]; // Helper so that the implementation of u_pica_regs can be changed later -uint readPicaReg(uint reg_addr) { return u_picaRegs[reg_addr - 0x48]; } +uint readPicaReg(uint reg_addr) { return u_picaRegs[reg_addr - 0x48u]; } vec4 tevSources[16]; vec4 tevNextPreviousBuffer; @@ -414,4 +414,4 @@ void main() { break; } } -} \ No newline at end of file +} diff --git a/src/host_shaders/opengl_vertex_shader.vert b/src/host_shaders/opengl_vertex_shader.vert index 63ef1ae4b..c9e5b2257 100644 --- a/src/host_shaders/opengl_vertex_shader.vert +++ b/src/host_shaders/opengl_vertex_shader.vert @@ -27,7 +27,7 @@ uniform uint u_textureEnvColor[6]; uniform uint u_picaRegs[0x200 - 0x48]; // Helper so that the implementation of u_pica_regs can be changed later -uint readPicaReg(uint reg_addr) { return u_picaRegs[reg_addr - 0x48]; } +uint readPicaReg(uint reg_addr) { return u_picaRegs[reg_addr - 0x48u]; } vec4 abgr8888ToVec4(uint abgr) { const float scale = 1.0 / 255.0;