Is this a shader?

Posted By: Otsego

Is this a shader? - 02/27/05 02:43

Does anybody know the sun rays effect in Star Wars Battleground? I am wondering if this is a shader and how it can be done?
Well, i don't have the game, so i can't show you any screenshots, but the effect is similar to tis one:

So, the number and positions of the rays are dependent on how much and wich parts of the sun are visible.

Any information about this?
Thanks
Posted By: xoNoid

Re: Is this a shader? - 02/27/05 03:05

I dont think so. It looks like some clever coding and a well drawn sprite to me.
I've seen a similar effect being done on the TORQUE techdemo on my Geforce 2 which doesnt support shaders.
Posted By: ventilator

Re: Is this a shader? - 02/27/05 03:15

to achieve such an effect you have to read a small area of the z-buffer at the sun position and then do some kind of radial blur with this data.

i don't know if it would be possible to achieve this with a dll in a6.
Posted By: Otsego

Re: Is this a shader? - 02/27/05 03:20

Ah, thank you!
Then i'll try to code an effect like this, but i think there will be some problems with trees. I can't ignore the transparent parts of their textures, so the effect will be quiet inexact. But i'll give it a try.

Edit: Thanks, ventilator! So, could the rays shine through the transparent parts of a texture then?
Posted By: ventilator

Re: Is this a shader? - 02/27/05 03:26

to get it working with transparent trees you just would have to use the alpha-testing material from the wiki. the tree pixels would be in the z-buffer then.
Posted By: Otsego

Re: Is this a shader? - 02/27/05 03:39

Great, i already use this material, so i have just to make such an effect .
Thanks again
© 2024 lite-C Forums