From bd38f9a8abcd1db3124a752ce49c1ee6fb299fde Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Thu, 18 Jul 2024 23:34:23 +0300 Subject: [PATCH] Shadergen: Add spotlight --- src/core/PICA/shader_gen_glsl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/PICA/shader_gen_glsl.cpp b/src/core/PICA/shader_gen_glsl.cpp index 8d955d502..b45256341 100644 --- a/src/core/PICA/shader_gen_glsl.cpp +++ b/src/core/PICA/shader_gen_glsl.cpp @@ -640,8 +640,8 @@ void FragmentGenerator::compileLUTLookup(std::string& shader, const PICA::Fragme case 1: shader += "lut_lookup_delta = dot(normalize(v_view), normalize(half_vector));\n"; break; case 2: shader += "lut_lookup_delta = dot(normal, normalize(v_view));\n"; break; case 3: shader += "lut_lookup_delta = dot(normal, light_vector);\n"; break; + case 4: shader += "lut_lookup_delta = dot(normal, lightSources[" + std ::to_string(lightIndex) + "].spotlightDirection);\n"; break; - case 4: // Spotlight default: Helpers::warn("Shadergen: Unimplemented LUT select"); shader += "lut_lookup_delta = 1.0;\n";