Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 857 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: A total of 9 (!) Post-Processing Shaders :) [Re: PHeMoX] #104860
01/02/07 16:55
01/02/07 16:55
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Bloom always incoporates blur as well.. this is how the effect works; otherwise it would just brighten things. The point is make it glow a bit.


Sphere Engine--the premier A6 graphics plugin.
Re: A total of 9 (!) Post-Processing Shaders :) [Re: PHeMoX] #104861
01/02/07 18:28
01/02/07 18:28
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline
User
Ichiro  Offline
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
That's pretty sweet -- thanks for sharing. :)


Dejobaan Games - Bringing you quality video games for over 75 years.
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 Offline OP
Senior Expert
PHeMoX  Offline 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 shader

I'd like to hear if this shader gives a 3D effect with 3D glasses,

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
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
Z
zazang Offline
User
zazang  Offline
User
Z

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: zazang] #104864
01/03/07 12:22
01/03/07 12:22
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline OP
Senior Expert
PHeMoX  Offline OP
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
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 can do with colors basically whatever you like, I think the main solution to your problem is first tone down the overal brightness of the colors and áfter that apply the bloom blur. I promise i'll try to 'fix' this shader this afternoon.

2.)I will look into this too, although it seems to be present indeed, it's hardly noticable with my projects. Your projects are 1024x768 too?

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
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 Offline
Senior Expert
ello  Offline
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: ello] #104866
01/03/07 14:35
01/03/07 14:35
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline OP
Senior Expert
PHeMoX  Offline OP
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Thank you ello, I'll look into this approach!

Quote:

i see you are having fun there:)





Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
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
Z
zazang Offline
User
zazang  Offline
User
Z

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..
Re: A total of 10 (!) Post-Processing Shaders :) [Re: PHeMoX] #104868
01/04/07 03:29
01/04/07 03:29
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Thanks for sharing.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
RE:3D Glasses shader [Re: William] #104869
01/04/07 12:42
01/04/07 12:42
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
i like your shaders really much, but the 3dglasses-shader don't work correct, i guess.
as far as i can see all red and blue "borders" have the same size, so there is no "optimal" 3d effect. so smaller the distance between these "borders", so more is it in the foreground.
Is it possible to make that with shaders?

Page 2 of 5 1 2 3 4 5

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1