Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by AndrewAMD. 08/27/26 15:28
Retrieve optimize() variables order (edited)
by NorbertSz. 08/25/26 13:24
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 7,578 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 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 | 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