From efb97598629b96378edd783af82936185d8a99ce Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 21 Nov 2017 18:54:11 +1000 Subject: 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. --- Source/Core/VideoBackends/Software/TransformUnit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/Software/TransformUnit.cpp') 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 matcolor; -- cgit v1.2.3