diff options
| author | Stenzek <stenzek@gmail.com> | 2017-11-21 18:54:11 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2017-11-22 01:52:18 +1000 |
| commit | efb97598629b96378edd783af82936185d8a99ce (patch) | |
| tree | 6be0e38fd495292ee5f5d63471732164254cccac /Source/Core/VideoBackends/Software/TransformUnit.cpp | |
| parent | 18c1bf19cac3b4299c55db35117f1383a5c80318 (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoBackends/Software/TransformUnit.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/TransformUnit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Software/TransformUnit.cpp b/Source/Core/VideoBackends/Software/TransformUnit.cpp index e9196798fc..5de48f4f05 100644 --- a/Source/Core/VideoBackends/Software/TransformUnit.cpp +++ b/Source/Core/VideoBackends/Software/TransformUnit.cpp @@ -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; |
