mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VertexShaderGen: Fix a potential bug where vertex shader uids don't change when
pixel lighting is toggled.
Same as revision f524312fd1
but done properly (why is our shader gen code this dumb?).
This commit is contained in:
@ -114,6 +114,7 @@ static void GenerateVertexShader(T& out, u32 components, API_TYPE api_type)
|
||||
|
||||
uid_data.numTexGens = xfregs.numTexGen.numTexGens;
|
||||
uid_data.components = components;
|
||||
uid_data.pixel_lighting = (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting);
|
||||
|
||||
if(api_type == API_OPENGL)
|
||||
{
|
||||
@ -279,8 +280,7 @@ static void GenerateVertexShader(T& out, u32 components, API_TYPE api_type)
|
||||
out.Write("o.colors_0 = float4(1.0f, 1.0f, 1.0f, 1.0f);\n");
|
||||
}
|
||||
|
||||
if (!(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting))
|
||||
GenerateLightingShader<T>(out, uid_data.lighting, components, I_MATERIALS, I_LIGHTS, "color", "o.colors_");
|
||||
GenerateLightingShader<T>(out, uid_data.lighting, components, I_MATERIALS, I_LIGHTS, "color", "o.colors_");
|
||||
|
||||
if (xfregs.numChan.numColorChans < 2)
|
||||
{
|
||||
|
Reference in New Issue
Block a user