summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2009-11-22 02:37:00 +0000
committerRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2009-11-22 02:37:00 +0000
commit19d7bb2c844149a434b3ee573a84a267c59b140b (patch)
tree1758f6c28479b1f8605352edb70f049fa2f2a5b7 /Source/Core/VideoCommon
parent7fa29f0b66be853ea79047929037c3df54bf4824 (diff)
big commit, implemented depth textures with hardware support in D3D, so now they will be correct as in opengl. please test a lot because i only tested the ati path, nvidia path is "Theoretical" :).
Also reimplemented screen clearing as a color quad to support alpha blending when clearing as in the original hardware. the funny thing is how is implemented peeking, as locking depth textures is not supported, implemented peeking copying the values form the depth texture to a r32f render target and then reading back the data. please a lot of testing to this commit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4599 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderGen.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
index 1b50d6d540..439400e347 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
@@ -453,10 +453,7 @@ const char *GeneratePixelShader(u32 texture_mask, bool dstAlphaEnable, u32 HLSL)
WRITE(p, "uniform float4 "I_FOG"[2] : register(c%d);\n", C_FOG);
WRITE(p, "void main(\n");
-
- WRITE(p, " out float4 ocol0 : COLOR0,\n");
- if (HLSL == 1)
- WRITE(p, " out float4 ocol1 : COLOR1,\n");
+ WRITE(p, " out float4 ocol0 : COLOR0,\n");
WRITE(p, " out float depth : DEPTH,\n");
// compute window position if needed because binding semantic WPOS is not widely supported
@@ -541,13 +538,6 @@ const char *GeneratePixelShader(u32 texture_mask, bool dstAlphaEnable, u32 HLSL)
WRITE(p, "depth = zCoord;\n");
- if(HLSL == 1)
- {
- WRITE(p, "float4 EncodedDepth = frac(zCoord * float4(254.0f/255.0,254.0f,254.0f*255.0f,0.0f));\n");
- WRITE(p, "EncodedDepth -= EncodedDepth.raag * float4(0.0f,1.0f/255.0f,1.0f/255.0f,0.0f);\n");
- WRITE(p, "ocol1 = float4(EncodedDepth.rgb,1.0f);\n");
-
- }
//if (bpmem.genMode.numindstages ) WRITE(p, "prev.rg = indtex0.xy;\nprev.b = 0;\n");
if (!WriteAlphaTest(p, HLSL))