Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Godrays with sprites?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 noatom   Members   

925
Like
0Likes
Like

Posted 27 February 2013 - 11:19 AM

How would one create god rays in an environment with just sprites?

 

I mean I'd like something like this: Have sprites with trees in the background,and rays  racing between the gaps.

 

Is there a tutorial for this? I have basic knowledge of HLSL,but never created god rays.



#2 ATEFred   Members   

1677
Like
0Likes
Like

Posted 27 February 2013 - 01:09 PM

You can do that, it was done in a bunch of games a few years ago. Time consuming though and can't really match the detailed shapes of the occluders.

( you have your tree meshes place out, and then camera facing tri strips additively blended onto the scene manually placed to match the gaps in foliage with fixed light direction.

 

A more flexible and less time consuming approach could be tracing through your shadow maps for each pixel on screen, computing the shadow factor for a bunch of steps in the atmosphere. Great results.

A cheaper / simpler approach is the screen space one described in gpu gems 3 I think, where you effectively just do a bunch of directional blurs towards light direction, killing them off if they hit an occluder texel. 



#3 noatom   Members   

925
Like
0Likes
Like

Posted 27 February 2013 - 02:11 PM

damn...this seems like A LOT of work...



#4 Orangeatang   Members   

3200
Like
0Likes
Like

Posted 27 February 2013 - 02:34 PM

Check this out http://xnauk-randomchaosblogarchive.blogspot.co.uk/2012/10/2d-crepuscular-god-rays.html



#5 noatom   Members   

925
Like
0Likes
Like

Posted 27 February 2013 - 02:49 PM

that looks good but all the code is in c#,and the shader code...well,it's a lot of code.Without a tutorial,I won't be able to implement it...






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.