3 registered members (AndrewAMD, BrainSailor, 1 invisible),
1,234
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: A total of 10 (!) Post-Processing Shaders :)
[Re: Ichiro]
#104862
01/02/07 19:04
01/02/07 19:04
|
Joined: Sep 2002
Posts: 8,177 Netherlands
PHeMoX
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2002
Posts: 8,177
Netherlands
|
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
|
|
|
Re: A total of 9 (!) Post-Processing Shaders :)
[Re: PHeMoX]
#104863
01/03/07 10:37
01/03/07 10:37
|
Joined: Oct 2003
Posts: 702
zazang
User
|
User
Joined: Oct 2003
Posts: 702
|
okay bloom blur or bloom without blur...it looks nice I tried it 2 more questions come up though :- 1).Is there a way to clamp the white and black values to certain values after the bloom effect has been applied ?.The reason is that it sometimes leads to too much artificial brightness at some parts of the level. 2).I noticed a border around many entities,especially very clear around the terrain.The border was having the color of the background skycube.Is it the effect of a probable glow shader integrated in it ?.Can it be avoided ? Thanks so much ! regards zazang
|
|
|
Re: A total of 10 (!) Post-Processing Shaders :)
[Re: PHeMoX]
#104865
01/03/07 13:19
01/03/07 13:19
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
Senior Expert
|
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
Quote:
Hi there.
1.)Yes, I think there is a way. I will get back to you on this, after I finish getting a nice 'black and white' shader done, currently using just 2 colors doesn't quite look right.
you could use a lookup-texture with a colorscale(or a greyscale) to get corresponding shades (by using tex1D(lookuptex, pixel); ) thus you can adjust the number of colors easily at low performancecost
i see you are having fun there:)
|
|
|
Re: A total of 10 (!) Post-Processing Shaders :)
[Re: PHeMoX]
#104867
01/04/07 02:01
01/04/07 02:01
|
Joined: Oct 2003
Posts: 702
zazang
User
|
User
Joined: Oct 2003
Posts: 702
|
Hi Phemox Yes indeed even our project is 1024x768 and I'll wait(1) for an update on this code Thanks ! regards zazang
I like good 'views' because they have no 'strings' attached..
|
|
|
|