diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-12-03 14:49:30 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-12-03 14:49:30 -0500 |
| commit | 88cd27bbcaaa46b8bbd3cf29ee71327c629be0c2 (patch) | |
| tree | 7f8799a92409bbd9fd9efe8327b305a3724adbdd /Source/Core/VideoCommon/VertexShaderGen.cpp | |
| parent | b9b3277fb52cc14065082482b0c654217b39841c (diff) | |
| parent | 36b886cb802c44eb02482b17ce483ba76ccb25ee (diff) | |
Merge pull request #1392 from kayru/d3d_viewport_depth
D3D: Replaced shader-based depth range remap with viewport
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderGen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index 24c6f39f46..26d6942372 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -405,7 +405,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ //if not early z culling will improve speed if (api_type == API_D3D) { - out.Write("o.pos.z = " I_DEPTHPARAMS".x * o.pos.w + o.pos.z * " I_DEPTHPARAMS".y;\n"); + out.Write("o.pos.z = o.pos.w + o.pos.z;\n"); } else // OGL { @@ -430,7 +430,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ // which in turn can be critical if it happens for clear quads. // Hence, we compensate for this pixel center difference so that primitives // get rasterized correctly. - out.Write("o.pos.xy = o.pos.xy - " I_DEPTHPARAMS".zw;\n"); + out.Write("o.pos.xy = o.pos.xy - " I_PIXELCENTERCORRECTION".xy;\n"); if (api_type == API_OPENGL) { |
