diff options
| author | NeoBrainX <NeoBrainX@gmail.com> | 2013-04-07 16:50:58 +0200 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@gmail.com> | 2013-04-07 16:54:22 +0200 |
| commit | 5f32febcf319dac44d3d170d2c644ce025cf41d7 (patch) | |
| tree | 5bf96878686fafe148632627706f821559c75d0c /Source | |
| parent | b76c7cf4f33a511fc5cf7a9f180208e4a41ceee4 (diff) | |
Apply re07a91930df0 to the software renderer.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp index 418b85f8f1..e741d79a1c 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp @@ -698,9 +698,13 @@ void Tev::Draw() } #endif } - - // 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]}; + + // convert to 8 bits per component + // 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; |
