postprocessing sun-lightshafts [DOWNLOAD]

Posted By: Hummel

postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 16:21

Hi,
I extruded the lightshaft effect from my Wavefield demo to an extra project and optimized several aspects.





Thx to Slin who converted a HLSL function to Lite-C wich gave a significant speed boost.

Get the demo from here.

Just check the readme for more information about how to implement the effect in your project.

Have fun,

Hummel
Posted By: Germanunkol

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 16:42

neat! thanks a lot for sharing this laugh
Posted By: Superku

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 16:54

This looks (especially ingame) really great, maybe the nicest sun of all videogames that I remember. And thanks for sharing, too!
Posted By: Widi

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 17:03

Looks great, as all shaders from you. Thank a lot
Posted By: maslone1

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 17:16

Thanx for sharing!
Posted By: darkinferno

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 18:29

think i followed the file correctly but i still get the error: PP_Add(mPP_LS_pass1_FX,camera,RT_SUNMASK2,NULL,NULL,NULL); wrong number of parameters though i dont see the difference between how i call it and how its called in our demo
Posted By: Hummel

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 19:03

thatīs strange...do you use the PP_Helper.c file from the demo?
Posted By: Widi

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 19:06

Include the PP_HELPER.c (before the LightShafts.c). That is missed in the readme-file wink
Posted By: Hummel

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 19:08

year I forgot that, but than he should get a 'function unknown' alert...
Posted By: darkinferno

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 19:12

i did include that file
Posted By: Hummel

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 19:15

when your project is not too big just upload it somewhere - Iīm going to take a look at it if you want wink
send me a PM
Posted By: darkinferno

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 20:15

well my project is huge.. lol
Posted By: Dark_samurai

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 21:20

Wow I love it!
Posted By: darkinferno

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/28/10 23:16

ahh, found it, some other shader was causing the problem, one of slins blooms shaders, it doesnt seem to work with shadeC's hdr also.. i did get it running however, like the speed of it
Posted By: SchokoKeks

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/29/10 14:32

the rays in the demo don't show up for me. There is no error message, but I can't see the sun in the sky and it doesn't cast rays. I can move it using the cursur keys, but that only changes the lightning on the ground.

my ATI HD 3780 graphics card should be able to handle it. drivers are a bit older, I might try updating it later.
Posted By: Hummel

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/29/10 15:32

hehe, ATI always sucks tongue

@darkinferno: I asked you whether you are using the PP_Helper.c from the demo or not because I modified the functions to support MRTs -> more parameters

EDIT:
I uploaded a small vid.

While making the vid I noticed that the calculated sunpos seems to be the one of the last frame but I was not able to correct that know...
You can see this when you use a small and/or fast moving sun frown
Posted By: Cowabanga

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/29/10 17:00

Originally Posted By: Hummel
hehe, ATI always sucks tongue
Fortunately, you're right! grin
BTW, the shader looks amazing laugh
Posted By: ChrisB

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/29/10 17:16

The sunrays look really good. congrats. *thumbup*
After looking a the code i may found the reason why it doesnt work on amd cards.
You cant mix shadermodel 3.0 and 2. (or less) in the same pass, pixelshader 3.0 are only specified to be run with vertexshader 3.0. Nvidia drivers don't complain about this but amds does.
Posted By: Hummel

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/29/10 18:01

ahhhh alright, didnt know that thx! laugh
@Schokokeks: just change this line in skycube_FX.fx: VertexShader = compile vs_2_0 VS(); to this: VertexShader = compile vs_3_0 VS();
Posted By: SchokoKeks

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/30/10 12:34

Thank you hummel, changing that line worked indeed.
Great effect! can it also be used for larger/more detailed levels or will it get too slow?
Posted By: Hummel

Re: postprocessing sun-lightshafts [DOWNLOAD] - 01/30/10 14:08

the speed is independent from the complexity of your level wink
Posted By: Truth

Re: postprocessing sun-lightshafts [DOWNLOAD] - 02/10/10 17:19

Any chance of this in c-script?
Posted By: Hummel

Re: postprocessing sun-lightshafts [DOWNLOAD] - 02/10/10 17:48

not from my side...
Posted By: CD_saber

Re: postprocessing sun-lightshafts [DOWNLOAD] - 02/11/10 15:11

What a nice looking effect!


Is is also possible to attach this effect to an model to let it "shine" (for example to light ball) ?
Posted By: HenWoll

Re: postprocessing sun-lightshafts [DOWNLOAD] - 02/27/16 23:59

@hummel

can you again upload the lightshafts ? ^^ i know this thread is older
Posted By: Dooley

Re: postprocessing sun-lightshafts [DOWNLOAD] - 02/28/16 01:55

Yes, I'd like to see them too laugh
Posted By: 3run

Re: postprocessing sun-lightshafts [DOWNLOAD] - 02/28/16 10:55

As far as I remember it didn't work with A8, maybe it needs some tweaking. I can search my HDD for it if Hummel won't mind.

Greets
Posted By: HenWoll

Re: postprocessing sun-lightshafts [DOWNLOAD] - 03/08/16 17:47

I sit and still hope you upload it. laugh
but stop ! why should not it run with the A8 ?
Posted By: 3run

Re: postprocessing sun-lightshafts [DOWNLOAD] - 03/08/16 18:32

Originally Posted By: BlackJack
I sit and still hope you upload it. laugh
but stop ! why should not it run with the A8 ?
It seems to me that there are some changes in A8 which are affecting shaders. Anyway, here is the demo:
Download link


Best regards!
© 2024 lite-C Forums