mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoCommon: Fix color channel logic when per-pixel lighting is in use
This was broken in #10012 (specifically by06579e4d53
andc3dec34391
).
This commit is contained in:
@ -787,6 +787,10 @@ ShaderCode GeneratePixelShaderCode(APIType api_type, const ShaderHostConfig& hos
|
||||
// out.SetConstantsUsed(C_PLIGHTS, C_PLIGHTS+31); // TODO: Can be optimized further
|
||||
// out.SetConstantsUsed(C_PMATERIALS, C_PMATERIALS+3);
|
||||
GenerateLightingShaderCode(out, uid_data->lighting, "colors_", "col");
|
||||
// The number of colors available to TEV is determined by numColorChans.
|
||||
// Normally this is performed in the vertex shader after lighting, but with per-pixel lighting,
|
||||
// we need to perform it here. (It needs to be done after lighting, as what was originally
|
||||
// black might become a different color after lighting).
|
||||
if (uid_data->numColorChans == 0)
|
||||
out.Write("col0 = float4(0.0, 0.0, 0.0, 0.0);\n");
|
||||
if (uid_data->numColorChans <= 1)
|
||||
|
Reference in New Issue
Block a user