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:
Stenzek
2017-11-21 18:54:11 +10:00
parent 18c1bf19ca
commit efb9759862
7 changed files with 38 additions and 29 deletions

View File

@ -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;