Media Player Classic 30

このエントリーをはてなブックマークに追加
994Sharpen_3x3 ( Seb.26 )(PS3.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)
#define x 1.0 //数値でシャープ強度調整可
float4 main(float2 tex : TEXCOORD0) : COLOR
{
float dx =(one_over_width*x);
float dy =(one_over_height*x);
float4 c9 = tex2D(s0, tex) * 2.0;
float4 c1 = tex2D( s0, tex + float2( -dx , -dy ) ) * 0.1;
c1 += tex2D( s0, tex + float2( 0 , -dy ) ) * 0.15;
c1 += tex2D( s0, tex + float2( dx , -dy ) ) * 0.1;
c1 += tex2D( s0, tex + float2( -dx , 0 ) ) * 0.15;
c1 += tex2D( s0, tex + float2( dx , 0 ) ) * 0.15;
c1 += tex2D( s0, tex + float2( -dx , dy ) ) * 0.1;
c1 += tex2D( s0, tex + float2( 0 , dy ) ) * 0.15;
c1 += tex2D( s0, tex + float2( dx , dy ) ) * 0.1;
float4 c0 = c9 -c1 ;
return c0;
}
995Sharpen_5x5 ( Seb.26 )(PS3.0):2009/03/16(月) 00:39:52 ID:VTSyZCPs
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)
#define x 1.0 //数値でシャープ強度調整可
float4 main(float2 tex : TEXCOORD0) : COLOR{float dx = (one_over_width*x);float dy = (one_over_height*x);
float dx2 = one_over_width * 2;float dy2 = one_over_height * 2;float4 coef = float4( 0.025, 0.05, 0.1, 2.0 );
float4 c0 = tex2D( s0, tex ) * coef[3];float4 c1 = tex2D( s0, tex + float2( -dx2 , -dy2 ) ) * coef[0];
c1 += tex2D( s0, tex + float2( -dx , -dy2 ) ) * coef[0];c1 += tex2D( s0, tex + float2( 0 , -dy2 ) ) * coef[0];
c1 += tex2D( s0, tex + float2( dx , -dy2 ) ) * coef[0];c1 += tex2D( s0, tex + float2( dx2 , -dy2 ) ) * coef[0];
c1 += tex2D( s0, tex + float2( -dx2 , -dy ) ) * coef[0];c1 += tex2D( s0, tex + float2( -dx , -dy ) ) * coef[1] ;
c1 += tex2D( s0, tex + float2( 0 , -dy ) ) * coef[2] ;c1 += tex2D( s0, tex + float2( dx , -dy ) ) * coef[1] ;
c1 += tex2D( s0, tex + float2( dx2 , -dy ) ) * coef[0];c1 += tex2D( s0, tex + float2( -dx2 , 0 ) ) * coef[0];
c1 += tex2D( s0, tex + float2( -dx , 0 ) ) * coef[2] ;c1 += tex2D( s0, tex + float2( dx , 0 ) ) * coef[2] ;
c1 += tex2D( s0, tex + float2( dx2 , 0 ) ) * coef[0];c1 += tex2D( s0, tex + float2( -dx2 , dy ) ) * coef[0];
c1 += tex2D( s0, tex + float2( -dx , dy ) ) * coef[1] ;c1 += tex2D( s0, tex + float2( 0 , dy ) ) * coef[2] ;
c1 += tex2D( s0, tex + float2( dx , dy ) ) * coef[1] ;c1 += tex2D( s0, tex + float2( dx2 , dy ) ) * coef[0];
c1 += tex2D( s0, tex + float2( -dx2 , dy2 ) ) * coef[0];c1 += tex2D( s0, tex + float2( -dx , dy2 ) ) * coef[0];
c1 += tex2D( s0, tex + float2( 0 , dy2 ) ) * coef[0];c1 += tex2D( s0, tex + float2( dx , dy2 ) ) * coef[0];
c1 += tex2D( s0, tex + float2( dx2 , dy2 ) ) * coef[0];c0 -= c1;return c0;}
996EdgeSharpen v1.1 ( Seb.26 3.0):2009/03/16(月) 00:46:31 ID:VTSyZCPs
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)
#define Edge_width 2.0
#define Edge_threshold 0.2
#define Sharpen_width 1.0
#define Sharpen_val0 2.0
#define Sharpen_val1 0.125
float4 main(float2 tex : TEXCOORD0) : COLOR
{float4 Res = tex2D( s0, tex );float dx = Edge_width / height;
float dy = Edge_width / width;float4 c2 = tex2D(s0, tex + float2( 0,-dy) );
float4 c3 = tex2D(s0, tex + float2(-dx,0) );float4 c4 = tex2D(s0, tex + float2( dx,0) );
float4 c5 = tex2D(s0, tex + float2( 0, dy) );float4 c0 = Res*4 - c2 - c3 - c4 - c5;
if( length(c0) > Edge_threshold ){dx = Sharpen_width / width;
dy = Sharpen_width / height;float4 c1 = tex2D(s0, tex + float2(-dx,-dy)) ;
c2 = tex2D(s0, tex + float2(0,-dy)) ;c3 = tex2D(s0, tex + float2(-dx,0)) ;
c4 = tex2D(s0, tex + float2(dx,0));c5 = tex2D(s0, tex + float2(0,dy)) ;
float4 c6 = tex2D(s0, tex + float2(dx,dy)) ;float4 c7 = tex2D(s0, tex + float2(-dx,+dy));
float4 c8 = tex2D(s0, tex + float2(+dx,-dy)) ;float4 c9 =Res * Sharpen_val0;
Res = c9 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 ) * Sharpen_val1 ;
// Remove '//' from next line to see detected Edges in red ...
//Res = float4( 1.0, 0.0, 0.0, 0.0 );
} return Res;}
997Tout selectionner:2009/03/16(月) 01:00:55 ID:VTSyZCPs
sampler s0 : register(s0);float4 p0 : register(c0);float4 p1 : register(c1);
#define width (p0[0])
#define height (p0[1])
#define px (p1[0])
#define py (p1[1])
#define moyenne 0.6
#define dx (moyenne*px)
#define dy (moyenne*py)
#define CoefFlou 2
#define CoefOri (1+ CoefFlou)
#define SharpenEdge 0.2
#define Sharpen_val0 2.0
#define Sharpen_val1 (Sharpen_val0/8)
float4 main( float2 tex : TEXCOORD0 ) : COLOR
{float4 ori = 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));float4 flou = (c1+c3+c6+c8 + 2*(c2+c4+c5+c7)+ 4*ori)*0.0625;
float4 cori = CoefOri*ori - CoefFlou*flou;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));float delta1 = (c3 + 2*c5 + c8)-(c1 + 2*c4 + c6);
float delta2 = (c6 + 2*c7 + c8)-(c1 + 2*c2 + c3);if( sqrt( mul(delta1,delta1) + mul(delta2,delta2) ) >SharpenEdge )
{return ori*Sharpen_val0 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 ) * Sharpen_val1 ;} else{ return cori; }}