Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
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 (AndrewAMD), 609 guests, and 3 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
Toon Shader and lighting #133343
06/02/07 21:45
06/02/07 21:45
Joined: Mar 2007
Posts: 75
M
Metal_Man Offline OP
Junior Member
Metal_Man  Offline OP
Junior Member
M

Joined: Mar 2007
Posts: 75
I;m using the toon shader from the Wiki, but I am having a problem in that the shader doesn't respond to level lighting, only the sun. The model is fully lit in the dark.

How can I get the shader to respond to lights in the level?

Re: Toon Shader and lighting [Re: Metal_Man] #133344
06/02/07 21:47
06/02/07 21:47
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
well it will take a bit of work as that shader doesnt support level level lighting at all

Re: Toon Shader and lighting [Re: lostclimate] #133345
06/02/07 22:01
06/02/07 22:01
Joined: Mar 2007
Posts: 75
M
Metal_Man Offline OP
Junior Member
Metal_Man  Offline OP
Junior Member
M

Joined: Mar 2007
Posts: 75
how do other shaders do it?

Is there any way to make it base its shading off of how the model is lit when no shader is used?


I can be contacted at clydeshaffer@gmail.com
Re: Toon Shader and lighting [Re: Metal_Man] #133346
06/02/07 23:06
06/02/07 23:06
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
well there is a couple of ways it can be done, one way is to make a toon shader that can be fed the brightness of the lightmap (well technically that has to be done either way) and the other step is a decision between quality and ease, the easiest version is to do a trace down,to the closest block, find its lighting and input that into the shader every frame the hard way is to read it from the wmp file itself, find the distance and angle from the light and then use that to decide which direction and if that light should light the models.

Re: Toon Shader and lighting [Re: lostclimate] #133347
06/02/07 23:23
06/02/07 23:23
Joined: Mar 2007
Posts: 75
M
Metal_Man Offline OP
Junior Member
Metal_Man  Offline OP
Junior Member
M

Joined: Mar 2007
Posts: 75
For now, I think I'll try the easier way.

How do I do that?


I can be contacted at clydeshaffer@gmail.com
Re: Toon Shader and lighting [Re: Metal_Man] #133348
06/02/07 23:41
06/02/07 23:41
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
in the shader you can use float3 vecLight;

This will tell the shader the brightness of the block (same way as using a trace, but without doing it twice as the engine already does this


xXxGuitar511
- Programmer
Re: Toon Shader and lighting [Re: xXxGuitar511] #133349
06/03/07 20:24
06/03/07 20:24
Joined: Mar 2007
Posts: 75
M
Metal_Man Offline OP
Junior Member
Metal_Man  Offline OP
Junior Member
M

Joined: Mar 2007
Posts: 75
thanks


I can be contacted at clydeshaffer@gmail.com

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