mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-02 15:45:58 +00:00
LightingShaderGen: Always calculate lighting for both color channels
Cel-damage uses the color from the lighting stage of the vertex pipeline as texture coordinates, but sets numColorChans to zero. We now calculate the colors in all cases, but override the color before writing it from the vertex shader if numColorChans is set to a lower value.
This commit is contained in:
parent
18c1bf19ca
commit
efb9759862
7 changed files with 38 additions and 29 deletions
|
@ -321,7 +321,7 @@ static void LightAlpha(const Vec3& pos, const Vec3& normal, u8 lightNum, const L
|
|||
|
||||
void TransformColor(const InputVertexData* src, OutputVertexData* dst)
|
||||
{
|
||||
for (u32 chan = 0; chan < xfmem.numChan.numColorChans; chan++)
|
||||
for (u32 chan = 0; chan < NUM_XF_COLOR_CHANNELS; chan++)
|
||||
{
|
||||
// abgr
|
||||
std::array<u8, 4> matcolor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue