Horde3D

Next-Generation Graphics Engine
It is currently 24.05.2013, 13:18

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Lightshaft shader
PostPosted: 03.06.2011, 20:17 
Offline

Joined: 05.04.2011, 18:53
Posts: 6
Hi!

I am currently working on a Lightshaft shader made with horde3D. It looks like this:

Image

The code is not final, but I still put a preliminary version of it on my blog at http://probesys.blogspot.com/

Does anyone have made a similar shader or have any comments or improvement suggestion?


Top
 Profile  
 
 Post subject: Re: Lightshaft shader
PostPosted: 06.06.2011, 02:16 
Offline

Joined: 05.03.2007, 19:38
Posts: 152
Location: Romania
I don't have any technical advice, I just wanted to say that it is nice to see this being done with Horde3D :)

_________________
Paul


Top
 Profile  
 
 Post subject: Re: Lightshaft shader
PostPosted: 06.06.2011, 03:11 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
Very nice effect -- but I'm guessing that with 100 samples per pixel it's probably quite expensive?

Perhaps if you down-sample the input texture you can get away with using less samples.


Top
 Profile  
 
 Post subject: Re: Lightshaft shader
PostPosted: 16.06.2011, 16:47 
Offline

Joined: 05.04.2011, 18:53
Posts: 6
Thanks guys for your comments! Yes you're right DarkAngel, 100 samples is quite fill-rate intensive. I did a few experiments with less samples, like 50 or 30, and it creates some artifacts, that are even more noticeable when the lightshafts are moving. But as you mentionned, using smaller buffers helps because it blurs most the artifacts. I am still working on it to get the best quality/performance ratio, but I will post my final code if some people are interested. As of now the performances are 310 fps with 100 sample, 500 fps with 50 samples, and 665 fps with 30 samples all in 1024x768 with my GTX 470.

Thanks DarkAngel for your very good advices!


Top
 Profile  
 
 Post subject: Re: Lightshaft shader
PostPosted: 17.06.2011, 13:47 
Offline

Joined: 23.07.2009, 21:03
Posts: 51
Location: Germany
probesys wrote:
... but I will post my final code if some people are interested.


Im interested :D


Top
 Profile  
 
 Post subject: Re: Lightshaft shader
PostPosted: 14.10.2011, 22:26 
Offline

Joined: 08.06.2010, 14:17
Posts: 63
I tried to make similar shader, but mine only uses 20 samples. It does two passes, first one works similar to yours, except only using 10 samples, writes result to a half resolution buffer (not necessary, but speeds up things a bit and looks almost identical), and second pass is just a simple 10-sample radial blur. In the end it looks more or less same as one 100-sample pass.
Video


Top
 Profile  
 
 Post subject: Re: Lightshaft shader
PostPosted: 20.10.2011, 19:30 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Great work, it's nice to see how your project progresses! I especially like your lit particles...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group