diff options
| author | Jules Blok <jules.blok@gmail.com> | 2015-01-02 13:35:53 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2015-01-02 14:32:42 +0100 |
| commit | 26a9afa0e7f3f1d8443062c0149cf461412f4ecb (patch) | |
| tree | cf273b4e94b51bb9e3129e79ca2784d56460479f /Source/Core/VideoBackends/D3D/PixelShaderCache.cpp | |
| parent | 491de39325be1488d6ee4800ac7c4051a6b4ebd8 (diff) | |
Anaglyph: Use matrices instead of vectors.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PixelShaderCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/PixelShaderCache.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp index adafe5e708..045de131a1 100644 --- a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp +++ b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp @@ -73,17 +73,15 @@ const char anaglyph_program_code[] = { "out float4 ocol0 : SV_Target,\n" "in float4 pos : SV_Position,\n" "in float3 uv0 : TEXCOORD0){\n" - "float3 l = Tex0.Sample(samp0, float3(uv0.xy, 0.0)).rgb;\n" - "float3 r = Tex0.Sample(samp0, float3(uv0.xy, 1.0)).rgb;\n" - "float3 lr = float3(0.437,0.449,0.164);\n" - "float3 lg = float3(-0.062,-0.062,-0.024);\n" - "float3 lb = float3(-0.048,-0.050,-0.017);\n" - "float3 rr = float3(-0.011,-0.032,-0.007);\n" - "float3 rg = float3(0.377,0.761,0.009);\n" - "float3 rb = float3(-0.026,-0.093,1.234);\n" - "float3 c0 = float3(dot(l, lr), dot(l, lg), dot(l, lb));\n" - "float3 c1 = float3(dot(r, rr), dot(r, rg), dot(r, rb));\n" - "ocol0 = float4(c0 + c1, 1.0);\n" + "float4 c0 = Tex0.Sample(samp0, float3(uv0.xy, 0.0));\n" + "float4 c1 = Tex0.Sample(samp0, float3(uv0.xy, 1.0));\n" + "float3x3 l = float3x3( 0.437, 0.449, 0.164,\n" + " -0.062,-0.062,-0.024,\n" + " -0.048,-0.050,-0.017);\n" + "float3x3 r = float3x3(-0.011,-0.032,-0.007,\n" + " 0.377, 0.761, 0.009,\n" + " -0.026,-0.093, 1.234);\n" + "ocol0 = float4(mul(l, c0.rgb) + mul(r, c1.rgb), c0.a);\n" "}\n" }; |
