summaryrefslogtreecommitdiffstats
path: root/video/out/d3d_shader_yuv.hlsl
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-12-23 12:46:20 +0100
committerwm4 <wm4@nowhere>2013-01-13 20:04:14 +0100
commit9f27ebbe6392fa5fd14b685d9f0a20c59b3a4535 (patch)
treef292aab6c04f4866ae864c787cda14c3401be2eb /video/out/d3d_shader_yuv.hlsl
parentdd89c542e3364bd4f9294c3ac5bcbfb6b0f16594 (diff)
downloadmpv-9f27ebbe6392fa5fd14b685d9f0a20c59b3a4535.tar.bz2
mpv-9f27ebbe6392fa5fd14b685d9f0a20c59b3a4535.tar.xz
vo_direct3d: remove 2ch hack for 10 bit playback
This was an awkward hack that attempted to avoid the use of 16 bit textures, while still allowing rendering 10-16 bit YUV formats. The idea was that even if the hardware doesn't support 16 bit textures, an A8L8 textures could be used to convert 10 bit (etc.) to 8 bit in the shader, instead of doing this on the CPU. This was an experiment, disabled by default, and was (probably) rarely used. I've never heard of this being used successfully. Remove it.
Diffstat (limited to 'video/out/d3d_shader_yuv.hlsl')
-rw-r--r--video/out/d3d_shader_yuv.hlsl15
1 files changed, 0 insertions, 15 deletions
diff --git a/video/out/d3d_shader_yuv.hlsl b/video/out/d3d_shader_yuv.hlsl
index b17e257210..0e78554254 100644
--- a/video/out/d3d_shader_yuv.hlsl
+++ b/video/out/d3d_shader_yuv.hlsl
@@ -1,6 +1,5 @@
// Compile with:
// fxc.exe /Tps_2_0 /Fhd3d_shader_yuv.h d3d_shader_yuv.hlsl /Vnd3d_shader_yuv
-// fxc.exe /Tps_2_0 /Fhd3d_shader_yuv_2ch.h d3d_shader_yuv.hlsl /Vnd3d_shader_yuv_2ch /DUSE_2CH=1
// Be careful with this shader. You can't use constant slots, since we don't
// load the shader with D3DX. All uniform variables are mapped to hardcoded
@@ -11,26 +10,12 @@ sampler2D tex1 : register(s1);
sampler2D tex2 : register(s2);
uniform float4x4 colormatrix : register(c0);
-uniform float2 depth : register(c5);
-
-#ifdef USE_2CH
-
-float1 sample(sampler2D tex, float2 t)
-{
- // Sample from A8L8 format as if we sampled a single value from L16.
- // We compute the 2 channel values back into one.
- return dot(tex2D(tex, t).xw, depth);
-}
-
-#else
float1 sample(sampler2D tex, float2 t)
{
return tex2D(tex, t).x;
}
-#endif
-
float4 main(float2 t0 : TEXCOORD0,
float2 t1 : TEXCOORD1,
float2 t2 : TEXCOORD2)