blur.txt

(0 KB) Pobierz
sampler s0 : register(s0); 
 
#define len (0.001) 

float4 main(float2 tex : TEXCOORD0) : COLOR 
{ 
	float4 c1 = tex2D(s0, tex + float2(-len,-len));
	float4 c2 = tex2D(s0, tex + float2(0,-len));
	float4 c3 = tex2D(s0, tex + float2(len,-len));
	float4 c4 = tex2D(s0, tex + float2(-len,0));
	float4 c5 = tex2D(s0, tex + float2(len,0));
	float4 c6 = tex2D(s0, tex + float2(-len,len));
	float4 c7 = tex2D(s0, tex + float2(0,len));
	float4 c8 = tex2D(s0, tex + float2(len,len));
	
	float4 c0 = (c1+c2+c3+c4+c5+c6+c7+c8)/8; 
	
	return c0; 
}
Zgłoś jeśli naruszono regulamin