diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-12-31 15:29:45 +0100 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-12-31 16:32:56 +0100 |
commit | bc187be0c13f66b1a714d868ab8aa18214550bdc (patch) | |
tree | 1ef39b15a1694602577bf0d14552e8928a147d47 /src | |
parent | Pica/Rasterizer: Make orient2d a free function and rename it to SignedArea. (diff) | |
download | yuzu-bc187be0c13f66b1a714d868ab8aa18214550bdc.tar yuzu-bc187be0c13f66b1a714d868ab8aa18214550bdc.tar.gz yuzu-bc187be0c13f66b1a714d868ab8aa18214550bdc.tar.bz2 yuzu-bc187be0c13f66b1a714d868ab8aa18214550bdc.tar.lz yuzu-bc187be0c13f66b1a714d868ab8aa18214550bdc.tar.xz yuzu-bc187be0c13f66b1a714d868ab8aa18214550bdc.tar.zst yuzu-bc187be0c13f66b1a714d868ab8aa18214550bdc.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/rasterizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 9850e517a..025d4e484 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -433,9 +433,9 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, // TODO: Does depth indeed only get written even if depth testing is enabled? if (registers.output_merger.depth_test_enable) { - u16 z = (u16)(-((float)v0.screenpos[2].ToFloat32() * w0 + - (float)v1.screenpos[2].ToFloat32() * w1 + - (float)v2.screenpos[2].ToFloat32() * w2) * 65535.f / wsum); + u16 z = (u16)(-(v0.screenpos[2].ToFloat32() * w0 + + v1.screenpos[2].ToFloat32() * w1 + + v2.screenpos[2].ToFloat32() * w2) * 65535.f / wsum); u16 ref_z = GetDepth(x >> 4, y >> 4); bool pass = false; |