Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AbrahamR, AndrewAMD), 1,305 guests, and 2 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
INTERESTING #126780
04/27/07 11:47
04/27/07 11:47
Joined: Apr 2007
Posts: 29
R
Raymaker Offline OP
Newbie
Raymaker  Offline OP
Newbie
R

Joined: Apr 2007
Posts: 29
I have an idea of a shader that makes shadows on everything that has it attached.It works on the vertex level so I thought that making a c_trace in the material event function that looks like this (this is for explenation)
a= world transformed pos of vertex;
b = sun position
c_trace(a,b,....);

And if value of a could somehow be sent from material to the material's event it should work this way;
If you have some other ides post them here
c_trace(a,b,....);

if(you== sun_entity){//sun entity is the model placed enywhere
c=1; // c=number between 0 and 1;

}else {

c=0;
}than the c value should be sent back to the shader(I dont know how)

and the color "mul"-ed with c;

this should darken the vertexes that are not seen by the sun_entity;

this i think is a faster metod of making shadows on the surfaces tht don't need a detiled shadows; I ask you to help me get it right and working;I'll be very thakfull;

Re: INTERESTING [Re: Raymaker] #126781
04/27/07 11:57
04/27/07 11:57
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
that's how the terrain shadow baker from AU works. but you won't believe how slow a complete c_trace for a 512*512 array is (262144 traces per image and object-> 30 fps minimum->almost 8 million traces/s (with only one object to be shadowed, like terrain) with a function that's marked as "slow"). so it's only usable for baking.


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