diff options
author | v0lt <v0lt@rambler.ru> | 2013-03-22 21:01:51 +0400 |
---|---|---|
committer | v0lt <v0lt@rambler.ru> | 2013-03-22 21:01:51 +0400 |
commit | 4d183f06c2fde692452ed8831360e3b8f74beb5e (patch) | |
tree | 20371a03a6476117a20418d1ba50e0e08b322ac2 /distrib | |
parent | 0e2e3b94584d32dd76a654869cd849757f305cc8 (diff) |
Revert "Shaders: shaders moved from ini and registry to separate folder."
This reverts commit 0e2e3b94584d32dd76a654869cd849757f305cc8.
Diffstat (limited to 'distrib')
23 files changed, 0 insertions, 795 deletions
diff --git a/distrib/Shaders/0-255 to 16-235.psh b/distrib/Shaders/0-255 to 16-235.psh deleted file mode 100644 index 44c5b6f6c..000000000 --- a/distrib/Shaders/0-255 to 16-235.psh +++ /dev/null @@ -1,13 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); - -#define const_1 ( 16.0 / 255.0) -#define const_2 (219.0 / 255.0) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - // original pixel - float4 c0 = tex2D(s0, tex); - - return (c0 * const_2) + const_1; -} diff --git a/distrib/Shaders/16-235 to 0-255 [SD].psh b/distrib/Shaders/16-235 to 0-255 [SD].psh deleted file mode 100644 index a67e9b296..000000000 --- a/distrib/Shaders/16-235 to 0-255 [SD].psh +++ /dev/null @@ -1,22 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) - -#define const_1 ( 16.0 / 255.0) -#define const_2 (255.0 / 219.0) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - // original pixel - float4 c0 = tex2D(s0, tex); - - // ATI driver only looks at the height - if (height >= 720) { - return c0; - } else { - return ((c0 - const_1) * const_2); - } -} diff --git a/distrib/Shaders/16-235 to 0-255 [SD][HD].psh b/distrib/Shaders/16-235 to 0-255 [SD][HD].psh deleted file mode 100644 index 034a8bc61..000000000 --- a/distrib/Shaders/16-235 to 0-255 [SD][HD].psh +++ /dev/null @@ -1,13 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); - -#define const_1 ( 16.0 / 255.0) -#define const_2 (255.0 / 219.0) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - // original pixel - float4 c0 = tex2D(s0, tex); - - return ((c0 - const_1) * const_2); -} diff --git a/distrib/Shaders/BT.601 to BT.709.psh b/distrib/Shaders/BT.601 to BT.709.psh deleted file mode 100644 index f41ae166a..000000000 --- a/distrib/Shaders/BT.601 to BT.709.psh +++ /dev/null @@ -1,19 +0,0 @@ -// $ShaderVersion: ps_2_0 - -// (C) 2011 Jan-Willem Krans (janwillem32 <at> hotmail.com) released under GPL v2; see COPYING.txt - -// Correct video colorspace BT.601 [SD] to BT.709 [HD] for HD video input -// Use this shader only if BT.709 [HD] encoded video is incorrectly matrixed to full range RGB with the BT.601 [SD] colorspace. - -sampler s0; -float2 c0; - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float4 si = tex2D(s0, tex); // original pixel - if (c0.x < 1120 && c0.y < 630) { - return si; // this shader does not alter SD video - } - float3 s1 = si.rgb; - s1 = s1.rrr * float3(0.299, -0.1495 / 0.886, 0.5) + s1.ggg * float3(0.587, -0.2935 / 0.886, -0.2935 / 0.701) + s1.bbb * float3(0.114, 0.5, -0.057 / 0.701); // RGB to Y'CbCr, BT.601 [SD] colorspace - return (s1.rrr + float3(0, -0.1674679 / 0.894, 1.8556) * s1.ggg + float3(1.5748, -0.4185031 / 0.894, 0) * s1.bbb).rgbb; // Y'CbCr to RGB output, BT.709 [HD] colorspace -} diff --git a/distrib/Shaders/LCD angle correction.psh b/distrib/Shaders/LCD angle correction.psh deleted file mode 100644 index 77803b91c..000000000 --- a/distrib/Shaders/LCD angle correction.psh +++ /dev/null @@ -1,49 +0,0 @@ -// $ShaderVersion: ps_2_0 - -// (C) 2011 Jan-Willem Krans (janwillem32 <at> hotmail.com) released under GPL v2; see COPYING.txt - -// Brightness, contrast and gamma controls for RGB, linearly scaled from top to bottom. -// This shader can be run as a screen space pixel shader. It requires compiling with ps_2_0, -// but higher is better see http://en.wikipedia.org/wiki/Pixel_shader to look up what PS version -// your video card supports. -// This shader is meant to work with linear RGB input and output. Regular R'G'B' with -// a video gamma encoding will have to be converted with the linear gamma shaders to work properly. - -// Fractions, either decimal or not, are allowed -// RedBrightness, GreenBrightness and BlueBrightness, interval [-10, 10], default 0 -#define RedBrightnessTop 0 -#define GreenBrightnessTop 0 -#define BlueBrightnessTop 0 -#define RedBrightnessBottom 0 -#define GreenBrightnessBottom 0 -#define BlueBrightnessBottom 0 - -// RedContrast, GreenContrast and BlueContrast, interval [0, 10], default 1 -#define RedContrastTop 1 -#define GreenContrastTop 1 -#define BlueContrastTop 1 -#define RedContrastBottom 1 -#define GreenContrastBottom 1 -#define BlueContrastBottom 1 - -// RedGamma, GreenGamma and BlueGamma, interval (0, 10], default 1 -#define RedGammaTop 0.8 -#define GreenGammaTop 0.8 -#define BlueGammaTop 0.8 -#define RedGammaBottom 1 -#define GreenGammaBottom 1 -#define BlueGammaBottom 1 - -sampler s0; - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float3 s1 = tex2D(s0, tex).rgb; - // original pixel - float texyi = 1.0 - tex.y; - s1 = s1 * (texyi * float3(RedContrastTop, GreenContrastTop, BlueContrastTop) + tex.y * float3(RedContrastBottom, GreenContrastBottom, BlueContrastBottom)) + texyi * float3(RedBrightnessTop, GreenBrightnessTop, BlueBrightnessTop) + tex.y * float3(RedBrightnessBottom, GreenBrightnessBottom, BlueBrightnessBottom); - // process contrast and brightness on the original pixel - // preserve the sign bits of RGB values - float3 sb = sign(s1); - return (sb*pow(abs(s1), texyi * float3(RedGammaTop, GreenGammaTop, BlueGammaTop) + tex.y * float3(RedGammaBottom, GreenGammaBottom, BlueGammaBottom))).rgbb; - // process gamma correction and output -} diff --git a/distrib/Shaders/YV12 Chroma Upsampling.psh b/distrib/Shaders/YV12 Chroma Upsampling.psh deleted file mode 100644 index 14bbecc3f..000000000 --- a/distrib/Shaders/YV12 Chroma Upsampling.psh +++ /dev/null @@ -1,76 +0,0 @@ -// $ShaderVersion: ps_2_0 - -/* -YV12 chroma upsampling fixer -by Kurt Bernhard 'Leak' Pruenner - -Use with YV12 output if the half-resolution chroma -gets upsampled in hardware by doubling the values -instead of interpolating between them. - -(i.e. if you're getting blocky red edges on dark -backgrounds...) -*/ - -sampler s0 : register(s0); -float4 p0 : register(c0); -float4 p1 : register(c1); - -#define width (p0[0]) -#define height (p0[1]) - -float4 getPixel(float2 tex, float dx, float dy) -{ - tex.x += dx; - tex.y += dy; - - return tex2D(s0, tex); -} - -float4 rgb2yuv(float4 rgb) -{ - float4x4 coeffs = { - 0.299, 0.587, 0.114, 0.000, - -0.147, -0.289, 0.436, 0.000, - 0.615, -0.515, -0.100, 0.000, - 0.000, 0.000, 0.000, 0.000 - }; - - return mul(coeffs, rgb); -} - -float4 yuv2rgb(float4 yuv) -{ - float4x4 coeffs = { - 1.000, 0.000, 1.140, 0.000, - 1.000, -0.395, -0.581, 0.000, - 1.000, 2.032, 0.000, 0.000, - 0.000, 0.000, 0.000, 0.000 - }; - - return mul(coeffs, yuv); -} - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float dx = 1 / width; - float dy = 1 / height; - - float4 yuv00 = rgb2yuv(getPixel(tex, -dx, -dy)); - float4 yuv01 = rgb2yuv(getPixel(tex, -dx, 0)); - float4 yuv02 = rgb2yuv(getPixel(tex, -dx, dy)); - float4 yuv10 = rgb2yuv(getPixel(tex, 0, -dy)); - float4 yuv11 = rgb2yuv(getPixel(tex, 0, 0)); - float4 yuv12 = rgb2yuv(getPixel(tex, 0, dy)); - float4 yuv20 = rgb2yuv(getPixel(tex, dx, -dy)); - float4 yuv21 = rgb2yuv(getPixel(tex, dx, 0)); - float4 yuv22 = rgb2yuv(getPixel(tex, dx, dy)); - - float4 yuv = - (yuv00 * 1 + yuv01 * 2 + yuv02 * 1 + - yuv10 * 2 + yuv11 * 4 + yuv12 * 2 + - yuv20 * 1 + yuv21 * 2 + yuv22 * 1) / 16; - - yuv.r = yuv11.r; - - return yuv2rgb(yuv); -} diff --git a/distrib/Shaders/contour.psh b/distrib/Shaders/contour.psh deleted file mode 100644 index 4742897fa..000000000 --- a/distrib/Shaders/contour.psh +++ /dev/null @@ -1,27 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float dx = 4 / width; - float dy = 4 / height; - - float4 c2 = tex2D(s0, tex + float2( 0, -dy)); - float4 c4 = tex2D(s0, tex + float2(-dx, 0)); - float4 c5 = tex2D(s0, tex + float2( 0, 0)); - float4 c6 = tex2D(s0, tex + float2( dx, 0)); - float4 c8 = tex2D(s0, tex + float2( 0, dy)); - - float4 c0 = (-c2 - c4 + c5 * 4 - c6 - c8); - if (length(c0) < 1.0) { - c0 = float4(0, 0, 0, 0); - } else { - c0 = float4(1, 1, 1, 0); - } - - return c0; -} diff --git a/distrib/Shaders/deinterlace (blend).psh b/distrib/Shaders/deinterlace (blend).psh deleted file mode 100644 index 280f305dc..000000000 --- a/distrib/Shaders/deinterlace (blend).psh +++ /dev/null @@ -1,18 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float4 c0 = tex2D(s0, tex); - - float2 h = float2(0, 1 / height); - float4 c1 = tex2D(s0, tex - h); - float4 c2 = tex2D(s0, tex + h); - c0 = (c0 * 2 + c1 + c2) / 4; - - return c0; -} diff --git a/distrib/Shaders/denoise.psh b/distrib/Shaders/denoise.psh deleted file mode 100644 index ff4ceff12..000000000 --- a/distrib/Shaders/denoise.psh +++ /dev/null @@ -1,36 +0,0 @@ -// $ShaderVersion: ps_3_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) -#define val0 (1.0) -#define val1 (0.125) -#define effect_width (0.1) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float dx = 0.0f; - float dy = 0.0f; - float fTap = effect_width; - - float4 cAccum = tex2D(s0, tex) * val0; - - for (int iDx = 0; iDx < 16; ++iDx) { - dx = fTap / width; - dy = fTap / height; - - cAccum += tex2D(s0, tex + float2(-dx, -dy)) * val1; - cAccum += tex2D(s0, tex + float2( 0, -dy)) * val1; - cAccum += tex2D(s0, tex + float2(-dx, 0)) * val1; - cAccum += tex2D(s0, tex + float2( dx, 0)) * val1; - cAccum += tex2D(s0, tex + float2( 0, dy)) * val1; - cAccum += tex2D(s0, tex + float2( dx, dy)) * val1; - cAccum += tex2D(s0, tex + float2(-dx, +dy)) * val1; - cAccum += tex2D(s0, tex + float2(+dx, -dy)) * val1; - - fTap += 0.1f; - } - - return (cAccum / 16.0f); -} diff --git a/distrib/Shaders/edge sharpen.psh b/distrib/Shaders/edge sharpen.psh deleted file mode 100644 index 3e4eb2782..000000000 --- a/distrib/Shaders/edge sharpen.psh +++ /dev/null @@ -1,54 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) - -#define NbPixel 1 -#define Edge_threshold 0.2 -#define Sharpen_val0 2.0 -#define Sharpen_val1 0.125 - -float4 main(float2 tex : TEXCOORD0) : COLOR { - // size of NbPixel pixels - float dx = NbPixel / width; - float dy = NbPixel / height; - float4 Res = 0; - - // Edge detection using Prewitt operator - // Get neighbor points - // [ 1, 2, 3 ] - // [ 4, 0, 5 ] - // [ 6, 7, 8 ] - float4 c0 = tex2D(s0, tex); - float4 c1 = tex2D(s0, tex + float2(-dx, -dy)); - float4 c2 = tex2D(s0, tex + float2( 0, -dy)); - float4 c3 = tex2D(s0, tex + float2( dx, -dy)); - float4 c4 = tex2D(s0, tex + float2(-dx, 0)); - float4 c5 = tex2D(s0, tex + float2( dx, 0)); - float4 c6 = tex2D(s0, tex + float2(-dx, dy)); - float4 c7 = tex2D(s0, tex + float2( 0, dy)); - float4 c8 = tex2D(s0, tex + float2( dx, dy)); - - // Computation of the 3 derived vectors (hor, vert, diag1, diag2) - float4 delta1 = (c6 + c4 + c1 - c3 - c5 - c8); - float4 delta2 = (c4 + c1 + c2 - c5 - c8 - c7); - float4 delta3 = (c1 + c2 + c3 - c8 - c7 - c6); - float4 delta4 = (c2 + c3 + c5 - c7 - c6 - c4); - - // Computation of the Prewitt operator - float value = length(abs(delta1) + abs(delta2) + abs(delta3) + abs(delta4)) / 6; - - // If we have an edge (vector length > Edge_threshold) => apply sharpen filter - if (value > Edge_threshold) { - Res = c0 * Sharpen_val0 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8) * Sharpen_val1; - // Display edges in red... - //Res = float4( 1.0, 0.0, 0.0, 0.0 ); - - return Res; - } else { - return c0; - } -} diff --git a/distrib/Shaders/emboss.psh b/distrib/Shaders/emboss.psh deleted file mode 100644 index 972cafea0..000000000 --- a/distrib/Shaders/emboss.psh +++ /dev/null @@ -1,24 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float dx = 1 / width; - float dy = 1 / height; - - float4 c1 = tex2D(s0, tex + float2(-dx, -dy)); - float4 c2 = tex2D(s0, tex + float2( 0, -dy)); - float4 c4 = tex2D(s0, tex + float2(-dx, 0)); - float4 c6 = tex2D(s0, tex + float2( dx, 0)); - float4 c8 = tex2D(s0, tex + float2( 0, dy)); - float4 c9 = tex2D(s0, tex + float2( dx, dy)); - - float4 c0 = (-c1 - c2 - c4 + c6 + c8 + c9); - c0 = (c0.r + c0.g + c0.b) / 3 + 0.5; - - return c0; -} diff --git a/distrib/Shaders/grayscale.psh b/distrib/Shaders/grayscale.psh deleted file mode 100644 index 0e9be474e..000000000 --- a/distrib/Shaders/grayscale.psh +++ /dev/null @@ -1,9 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float c0 = dot(tex2D(s0, tex), float4(0.299, 0.587, 0.114, 0)); - - return c0; -} diff --git a/distrib/Shaders/invert.psh b/distrib/Shaders/invert.psh deleted file mode 100644 index f6a7b8a13..000000000 --- a/distrib/Shaders/invert.psh +++ /dev/null @@ -1,9 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float4 c0 = float4(1, 1, 1, 1) - tex2D(s0, tex); - - return c0; -} diff --git a/distrib/Shaders/letterbox.psh b/distrib/Shaders/letterbox.psh deleted file mode 100644 index 38a370f79..000000000 --- a/distrib/Shaders/letterbox.psh +++ /dev/null @@ -1,20 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float4 c0 = 0; - - float2 ar = float2(16, 9); - float h = (1 - width / height * ar.y / ar.x) / 2; - - if (tex.y >= h && tex.y <= 1 - h) { - c0 = tex2D(s0, tex); - } - - return c0; -} diff --git a/distrib/Shaders/nightvision.psh b/distrib/Shaders/nightvision.psh deleted file mode 100644 index 8a2061b17..000000000 --- a/distrib/Shaders/nightvision.psh +++ /dev/null @@ -1,8 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float c = dot(tex2D(s0, tex), float4(0.2, 0.6, 0.1, 0.1)); - return float4(0, c, 0, 0); -} diff --git a/distrib/Shaders/procamp.psh b/distrib/Shaders/procamp.psh deleted file mode 100644 index c78de4c7e..000000000 --- a/distrib/Shaders/procamp.psh +++ /dev/null @@ -1,59 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); -float4 p1 : register(c1); - -#define width (p0[0]) -#define height (p0[1]) -#define counter (p0[2]) -#define clock (p0[3]) -#define one_over_width (p1[0]) -#define one_over_height (p1[1]) - -#define PI acos(-1) - -static float4x4 r2y = { - 0.299, 0.587, 0.114, 0.000, - -0.147, -0.289, 0.437, 0.000, - 0.615, -0.515, -0.100, 0.000, - 0.000, 0.000, 0.000, 0.000 -}; - -static float4x4 y2r = { - 1.000, 0.000, 1.140, 0.000, - 1.000, -0.394, -0.581, 0.000, - 1.000, 2.028, 0.000, 0.000, - 0.000, 0.000, 0.000, 0.000 -}; - -#define ymin ( 16.0 / 255) -#define ymax (235.0 / 255) - -// Brightness: -1.0 to 1.0, default 0.0 -// Contrast: 0.0 to 10.0, default 1.0 -// Hue: -180.0 to +180.0, default 0.0 -// Saturation: 0.0 to 10.0, default 1.0 - -#define Brightness 0.0 -#define Contrast 1.0 -#define Hue 0.0 -#define Saturation 1.0 - -// tv -> pc scale -// #define Brightness (-ymin) -// #define Contrast (1.0 / (ymax - ymin)) - -static float2x2 HueMatrix = { - cos(Hue * PI / 180), sin(Hue * PI / 180), - -sin(Hue * PI / 180), cos(Hue * PI / 180) -}; - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float4 c0 = tex2D(s0, tex); - c0 = mul(r2y, c0); - c0.r = Contrast * (c0.r - ymin) + ymin + Brightness; - c0.gb = mul(HueMatrix, c0.gb) * Saturation; - c0 = mul(y2r, c0); - return c0; -} diff --git a/distrib/Shaders/sharpen complex 2.psh b/distrib/Shaders/sharpen complex 2.psh deleted file mode 100644 index 3293469e0..000000000 --- a/distrib/Shaders/sharpen complex 2.psh +++ /dev/null @@ -1,92 +0,0 @@ -// $ShaderVersion: ps_2_a - -/* Sharpen complex v2 (requires ps >= 2a) */ - -sampler s0 : register(s0); -float4 p0 : register(c0); -float4 p1 : register(c1); - -#define width (p0[0]) -#define height (p0[1]) - -// pixel "width" -#define px (p1[0]) -#define py (p1[1]) - -/* Parameters */ - -// for the blur filter -#define mean 0.6 -#define dx (mean * px) -#define dy (mean * py) - -#define CoefBlur 2 -#define CoefOrig (1 + CoefBlur) - -// for the sharpen filter -#define SharpenEdge 0.2 -#define Sharpen_val0 2 -#define Sharpen_val1 ((Sharpen_val0 - 1) / 8.0) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - // get original pixel - float4 orig = tex2D(s0, tex); - - // compute blurred image (gaussian filter) - float4 c1 = tex2D(s0, tex + float2(-dx, -dy)); - float4 c2 = tex2D(s0, tex + float2( 0, -dy)); - float4 c3 = tex2D(s0, tex + float2( dx, -dy)); - float4 c4 = tex2D(s0, tex + float2(-dx, 0)); - float4 c5 = tex2D(s0, tex + float2( dx, 0)); - float4 c6 = tex2D(s0, tex + float2(-dx, dy)); - float4 c7 = tex2D(s0, tex + float2( 0, dy)); - float4 c8 = tex2D(s0, tex + float2( dx, dy)); - - // gaussian filter - // [ 1, 2, 1 ] - // [ 2, 4, 2 ] - // [ 1, 2, 1 ] - // to normalize the values, we need to divide by the coeff sum - // 1 / (1+2+1+2+4+2+1+2+1) = 1 / 16 = 0.0625 - float4 flou = (c1 + c3 + c6 + c8 + 2 * (c2 + c4 + c5 + c7) + 4 * orig) * 0.0625; - - // substract blurred image from original image - float4 corrected = CoefOrig * orig - CoefBlur * flou; - - // edge detection - // Get neighbor points - // [ c1, c2, c3 ] - // [ c4, orig, c5 ] - // [ c6, c7, c8 ] - c1 = tex2D(s0, tex + float2(-px, -py)); - c2 = tex2D(s0, tex + float2( 0, -py)); - c3 = tex2D(s0, tex + float2( px, -py)); - c4 = tex2D(s0, tex + float2(-px, 0)); - c5 = tex2D(s0, tex + float2( px, 0)); - c6 = tex2D(s0, tex + float2(-px, py)); - c7 = tex2D(s0, tex + float2( 0, py)); - c8 = tex2D(s0, tex + float2( px, py)); - - // using Sobel filter - // horizontal gradient - // [ -1, 0, 1 ] - // [ -2, 0, 2 ] - // [ -1, 0, 1 ] - float delta1 = (c3 + 2 * c5 + c8) - (c1 + 2 * c4 + c6); - - // vertical gradient - // [ -1, - 2, -1 ] - // [ 0, 0, 0 ] - // [ 1, 2, 1 ] - float delta2 = (c6 + 2 * c7 + c8) - (c1 + 2 * c2 + c3); - - // computation - if (sqrt(mul(delta1, delta1) + mul(delta2, delta2)) > SharpenEdge) { - // if we have an edge, use sharpen - //return float4(1,0,0,0); - return orig * Sharpen_val0 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8) * Sharpen_val1; - } else { - // else return corrected image - return corrected; - } -} diff --git a/distrib/Shaders/sharpen complex.psh b/distrib/Shaders/sharpen complex.psh deleted file mode 100644 index 80d946564..000000000 --- a/distrib/Shaders/sharpen complex.psh +++ /dev/null @@ -1,71 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p1 : register(c1); - -#define dx (p1[0]) -#define dy (p1[1]) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - // Pixels definition: original, blurred, corrected, final - float4 orig; - float4 blurred; - float4 corrected; - float4 final; - - // Get neighbor points - // [ 1, 2, 3 ] - // [ 4, orig, 5 ] - // [ 6, 7, 8 ] - - orig = tex2D(s0, tex); - float4 c1 = tex2D(s0, tex + float2(-dx, -dy)); - float4 c2 = tex2D(s0, tex + float2( 0, -dy)); - float4 c3 = tex2D(s0, tex + float2( dx, -dy)); - float4 c4 = tex2D(s0, tex + float2(-dx, 0)); - float4 c5 = tex2D(s0, tex + float2( dx, 0)); - float4 c6 = tex2D(s0, tex + float2(-dx, dy)); - float4 c7 = tex2D(s0, tex + float2( 0, dy)); - float4 c8 = tex2D(s0, tex + float2( dx, dy)); - - // Computation of the blurred image (gaussian filter) - // to normalize the values, we need to divide by the coeff sum - // 1/(1+2+1+2+4+2+1+2+1) = 1/16 = 0.0625 - blurred = (c1 + c3 + c6 + c8 + 2 * (c2 + c4 + c5 + c7) + 4 * orig) * 0.0625; - - // substract blurred image from original image - corrected = 2 * orig - blurred; - - // edge detection - float delta1; - float delta2; - float value; - - // using Sobel filter - // horizontal gradient - // [ -1, 0, 1 ] - // [ -2, 0, 2 ] - // [ -1, 0, 1 ] - delta1 = (c3 + 2 * c5 + c8) - (c1 + 2 * c4 + c6); - - // vertical gradient - // [ -1, -2, -1 ] - // [ 0, 0, 0 ] - // [ 1, 2, 1 ] - delta2 = (c6 + 2 * c7 + c8) - (c1 + 2 * c2 + c3); - - // computation - value = sqrt(mul(delta1, delta1) + mul(delta2, delta2)); - - if (value > 0.3) { - // if we have an edge, use sharpen - #define Sharpen_val0 2.0 - #define Sharpen_val1 0.125 - final = orig * 2 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8) * 0.125; - //final = float4(1, 0, 0, 0); - return final; - } - - // else return corrected image - return corrected; -} diff --git a/distrib/Shaders/sharpen.psh b/distrib/Shaders/sharpen.psh deleted file mode 100644 index 903b1c663..000000000 --- a/distrib/Shaders/sharpen.psh +++ /dev/null @@ -1,31 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); -float4 p1 : register(c1); - -#define width (p0[0]) -#define height (p0[1]) - -#define val0 (2.0) -#define val1 (-0.125) -#define effect_width (1.6) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float dx = effect_width / width; - float dy = effect_width / height; - - float4 c1 = tex2D(s0, tex + float2(-dx, -dy)) * val1; - float4 c2 = tex2D(s0, tex + float2( 0, -dy)) * val1; - float4 c3 = tex2D(s0, tex + float2(-dx, 0)) * val1; - float4 c4 = tex2D(s0, tex + float2( dx, 0)) * val1; - float4 c5 = tex2D(s0, tex + float2( 0, dy)) * val1; - float4 c6 = tex2D(s0, tex + float2( dx, dy)) * val1; - float4 c7 = tex2D(s0, tex + float2(-dx, +dy)) * val1; - float4 c8 = tex2D(s0, tex + float2(+dx, -dy)) * val1; - float4 c9 = tex2D(s0, tex) * val0; - - float4 c0 = (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9); - - return c0; -} diff --git a/distrib/Shaders/sphere.psh b/distrib/Shaders/sphere.psh deleted file mode 100644 index 23521661b..000000000 --- a/distrib/Shaders/sphere.psh +++ /dev/null @@ -1,53 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define clock (p0[3]) -#define PI acos(-1) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - // - this is a very simple raytracer, one sphere only - // - no reflection or refraction, yet (my ati 9800 has a 64 + 32 instruction limit...) - - float3 pl = float3(3, -3, -4); // light pos - float4 cl = 0.4; // light color - - float3 pc = float3(0, 0, -1); // cam pos - float3 ps = float3(0, 0, 0.5); // sphere pos - float r = 0.65; // sphere radius - - float3 pd = normalize(float3(tex.x - 0.5, tex.y - 0.5, 0) - pc); - - float A = 1; - float B = 2 * dot(pd, pc - ps); - float C = dot(pc - ps, pc - ps) - r * r; - float D = B * B - 4 * A * C; - - float4 c0 = 0; - - if (D >= 0) { - // t2 is the smaller, obviously... - // float t1 = (-B + sqrt(D)) / (2 * A); - // float t2 = (-B - sqrt(D)) / (2 * A); - // float t = min(t1, t2); - - float t = (-B - sqrt(D)) / (2 * A); - - // intersection data - float3 p = pc + pd * t; - float3 n = normalize(p - ps); - float3 l = normalize(pl - p); - - // mapping the image onto the sphere - tex = acos(-n) / PI; - - // rotate it - tex.x = frac(tex.x + frac(clock / 10)); - - // diffuse + specular - c0 = tex2D(s0, tex) * dot(n, l) + cl * pow(max(dot(l, reflect(pd, n)), 0), 50); - } - - return c0; -} diff --git a/distrib/Shaders/spotlight.psh b/distrib/Shaders/spotlight.psh deleted file mode 100644 index 9b8bf0c5b..000000000 --- a/distrib/Shaders/spotlight.psh +++ /dev/null @@ -1,19 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) -#define clock (p0[3]) - -#define PI acos(-1) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float4 c0 = tex2D(s0, tex); - float3 lightsrc = float3(sin(clock * PI / 1.5) / 2 + 0.5, cos(clock * PI) / 2 + 0.5, 1); - float3 light = normalize(lightsrc - float3(tex.x, tex.y, 0)); - c0 *= pow(dot(light, float3(0, 0, 1)), 50); - - return c0; -} diff --git a/distrib/Shaders/wave.psh b/distrib/Shaders/wave.psh deleted file mode 100644 index 83a555442..000000000 --- a/distrib/Shaders/wave.psh +++ /dev/null @@ -1,21 +0,0 @@ -// $ShaderVersion: ps_2_0 - -sampler s0 : register(s0); -float4 p0 : register(c0); - -#define width (p0[0]) -#define height (p0[1]) -#define clock (p0[3]) - -float4 main(float2 tex : TEXCOORD0) : COLOR { - float4 c0 = 0; - - tex.x += sin(tex.x + clock / 0.3) / 20; - tex.y += sin(tex.x + clock / 0.3) / 20; - - if (tex.x >= 0 && tex.x <= 1 && tex.y >= 0 && tex.y <= 1) { - c0 = tex2D(s0, tex); - } - - return c0; -} diff --git a/distrib/mpc-hc_setup.iss b/distrib/mpc-hc_setup.iss index df5574b5d..58a9fc90f 100644 --- a/distrib/mpc-hc_setup.iss +++ b/distrib/mpc-hc_setup.iss @@ -231,50 +231,6 @@ Source: ..\COPYING.txt; DestDir: {app}; Components: mai Source: ..\docs\Authors.txt; DestDir: {app}; Components: main; Flags: ignoreversion
Source: ..\docs\Changelog.txt; DestDir: {app}; Components: main; Flags: ignoreversion
Source: ..\docs\Readme.txt; DestDir: {app}; Components: main; Flags: ignoreversion
-Source: "Shaders\0-255 to 16-235.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\16-235 to 0-255 [SD].psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\16-235 to 0-255 [SD][HD].psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\BT.601 to BT.709.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\contour.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\deinterlace (blend).psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\denoise.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\edge sharpen.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\emboss.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\grayscale.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\invert.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\LCD angle correction.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\letterbox.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\nightvision.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\procamp.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\sharpen.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\sharpen complex.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\sharpen complex 2.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\sphere.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\spotlight.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\wave.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\YV12 Chroma Upsampling.psh"; DestDir: "{userappdata}\Media Player Classic\Shaders"; Components: main; Flags: ignoreversion; Check: NOT IniUsed()
-Source: "Shaders\0-255 to 16-235.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\16-235 to 0-255 [SD].psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\16-235 to 0-255 [SD][HD].psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\BT.601 to BT.709.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\contour.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\deinterlace (blend).psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\denoise.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\edge sharpen.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\emboss.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\grayscale.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\invert.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\LCD angle correction.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\letterbox.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\nightvision.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\procamp.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\sharpen.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\sharpen complex.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\sharpen complex 2.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\sphere.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\spotlight.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\wave.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
-Source: "Shaders\YV12 Chroma Upsampling.psh"; DestDir: "{app}\Shaders"; Components: main; Flags: ignoreversion; Check: IniUsed()
[Icons]
@@ -407,12 +363,6 @@ begin end;
-function IniUsed(): Boolean;
-begin
- Result := FileExists(ExpandConstant('{app}\{#mpchc_ini}'));
-end;
-
-
// Check if MPC-HC's settings exist
function SettingsExist(): Boolean;
begin
@@ -443,8 +393,6 @@ begin //DelTree('{app}\Matrix*.bin', False, True, False);
DeleteFile(ExpandConstant('{app}\{#mpchc_ini}'));
DeleteFile(ExpandConstant('{userappdata}\Media Player Classic\default.mpcpl'));
- DelTree(ExpandConstant('{userappdata}\{#app_name}\Shaders\*.psh'), False, True, False);
- RemoveDir(ExpandConstant('{userappdata}\{#app_name}\Shaders'));
RemoveDir(ExpandConstant('{userappdata}\Media Player Classic'));
RegDeleteKeyIncludingSubkeys(HKCU, 'Software\Gabest\Filters');
RegDeleteKeyIncludingSubkeys(HKCU, 'Software\Gabest\Media Player Classic');
|