Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
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

Alpha Test with Water and Trees

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
1 reply to this topic

#1 hdlopesrocha   Members   

145
Like
0Likes
Like

Posted 18 June 2012 - 10:37 AM

Hello again!

Now my problem is rendering trees.

Posted Image



I tryed this:

http://blogs.msdn.com/b/shawnhar/archive/2009/02/18/depth-sorting-alpha-blended-objects.aspx

And It was nice, but water must be the last thing to draw...

I dont't know what to do... I am completely stuck in this problem.

#2 winsrp   Members   

277
Like
0Likes
Like

Posted 18 June 2012 - 11:31 AM

you need a deep list so you draw your objects from back to front, including the water.

water is normally last due to transparency, but since you have trees that have an alpha in them, then I will just consider trees and water all together, and draw water before trees if you are over ground, and trees before water if you are below water.

Edited by winsrp, 18 June 2012 - 11:31 AM.





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.