Infact, I've got one more.
Lol, having fun bigtime here.
I don't have 3D glasses, so I don't know if this shader actually gives the correct effect, but it does look a bit like what you need for it. If anyone could check it, I'd be grateful.
Well, here it comes;
3D Glasses shader:
Code:
// 3D glasses shader:
material mat_3Dglasses {
effect = "
sampler2D g_samSrcColor;
float ds;
float xx;
float yy;
float4 Color;
float3 vecSkill41;
const int NUM = 9;
const float threshold = 0.05; //0.05
const float2 c[9] = {float2(-0.0078125, 0.0078125),
float2( 0.00 , 0.0078125),
float2( 0.0078125, 0.0078125),
float2(-0.0078125, 0.00 ),
float2( 0.0, 0.0),
float2( 0.0078125, 0.007 ),
float2(-0.0078125,-0.0078125),
float2( 0.00 , -0.0078125),
float2( 0.0078125,-0.0078125),};
int i;
float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 {
for (i=0; i < NUM; i++) {
Color[i] = tex2D(g_samSrcColor, Tex.xy + c[i])*2;
}
return Color;
}
// Just one pass:
technique PostProcess {
pass p1 {
VertexShader = null;
PixelShader = compile ps_2_0 MyShader();
}
}
";
}
I'll see what else I can come up with. I have to say, it wasn't even my intention to make a 3D glasses shader, it just came out when I tried to get this shader to work:
Sobel Edge shaderI'd like to hear if this shader gives a 3D effect with 3D glasses,
Cheers