Shadergen: Add spotlight

This commit is contained in:
wheremyfoodat 2024-07-18 23:34:23 +03:00
parent 93e5f8e32c
commit bd38f9a8ab

View file

@ -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";