diff --git a/src/core/PICA/shader_gen_glsl.cpp b/src/core/PICA/shader_gen_glsl.cpp index 136647d70..6c6cd78c9 100644 --- a/src/core/PICA/shader_gen_glsl.cpp +++ b/src/core/PICA/shader_gen_glsl.cpp @@ -147,11 +147,11 @@ std::string FragmentGenerator::generate(const PICARegs& regs, const FragmentConf } float lutLookup(uint lut, int index) { - return texelFetch(u_tex_lighting_lut, ivec2(index, lut), 0).r; + return texelFetch(u_tex_lighting_lut, ivec2(index, int(lut)), 0).r; } vec3 regToColor(uint reg) { - return (1.0 / 255.0) * vec3(float((reg >> 20) & 0xFF), float((reg >> 10) & 0xFF), float(reg & 0xFF)); + return (1.0 / 255.0) * vec3(float((reg >> 20u) & 0xFFu), float((reg >> 10u) & 0xFFu), float(reg & 0xFFu)); } )"; } diff --git a/src/host_shaders/opengl_fragment_shader.frag b/src/host_shaders/opengl_fragment_shader.frag index 6a2baa963..9f369e39b 100644 --- a/src/host_shaders/opengl_fragment_shader.frag +++ b/src/host_shaders/opengl_fragment_shader.frag @@ -161,7 +161,7 @@ bool error_unimpl = false; vec4 unimpl_color = vec4(1.0, 0.0, 1.0, 1.0); float lutLookup(uint lut, int index) { - return texelFetch(u_tex_lighting_lut, ivec2(index, lut), 0).r; + return texelFetch(u_tex_lighting_lut, ivec2(index, int(lut)), 0).r; } vec3 regToColor(uint reg) {