Apply re07a91930df0 to the software renderer.

This commit is contained in:
NeoBrainX 2013-04-07 16:50:58 +02:00
parent b76c7cf4f3
commit 5f32febcf3
1 changed files with 7 additions and 3 deletions

View File

@ -700,7 +700,11 @@ void Tev::Draw()
}
// convert to 8 bits per component
u8 output[4] = {(u8)Reg[0][ALP_C], (u8)Reg[0][BLU_C], (u8)Reg[0][GRN_C], (u8)Reg[0][RED_C]};
// the results of the last tev stage are put onto the screen,
// regardless of the used destination register - TODO: Verify!
u32 color_index = bpmem.combiners[bpmem.genMode.numtevstages].colorC.dest;
u32 alpha_index = bpmem.combiners[bpmem.genMode.numtevstages].alphaC.dest;
u8 output[4] = {(u8)Reg[alpha_index][ALP_C], (u8)Reg[color_index][BLU_C], (u8)Reg[color_index][GRN_C], (u8)Reg[color_index][RED_C]};
if (!TevAlphaTest(output[ALP_C]))
return;