mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
LightingShaderGen: Always calculate lighting for both color channels
Cel-damage depends on lighting being calculated for the first channel even though there is no color in the vertex format (defaults to the material color). If lighting for the channel is not enabled, the vertex will use the default color as before. The default value of the color is determined by the number of elements in the vertex format. This fixes the grey cubes in Super Mario Sunshine. If the color channel count is zero, we set the color to black before the end of the vertex shader. It's possible that this would be undefined behavior on hardware if a vertex color index that was greater than the channel count was used within TEV.
This commit is contained in:
@ -58,7 +58,7 @@ struct VertexShaderConstants
|
||||
u32 components; // .x
|
||||
u32 xfmem_dualTexInfo; // .y
|
||||
u32 xfmem_numColorChans; // .z
|
||||
u32 pad1; // .w
|
||||
u32 color_chan_alpha; // .w
|
||||
|
||||
std::array<float4, 6> posnormalmatrix;
|
||||
std::array<float4, 4> projection;
|
||||
|
Reference in New Issue
Block a user