Skip to main content
gamedev.net
🔒 Locked

Grass rendering

Started by TohaTalib 5 replies 1.1k views
Original Post
TohaTalib
TohaTalib
I am trying to render a large amount of plants on my terrain engine but correct alpha blending needs objects sorting to camera position. This hardly kills my FPS. Please help! What render states can I use for correct blending with switched on state ZWRITEENABLED, and withaout manual objects sorting?
sirob
sirob
You could try using AlphaTesting, but not AlphaBlending. AlphaTesting doesn't require Z-Sorted geometry.
Sirob Yes.» - status: Work-O-Rama.
Todo
Todo
Alpha dithering is a very common solution that doesn't require geometry sorting, at the expense of quality. There's an excellent article about it in GPU Gems 2, but googling may yield similar answers. I'm sorry but I can't help you any further since I don't know specific details myself.

EDIT: in regards to the previous poster, this is related to alpha testing.
soconne
soconne
Quote:
Original post by Anonymous Poster
another approach is to render a alphaTest pass and then a alphablended pass (to blend the edges a little bit more). Although the blended edges are not sorted correctly, they mostly add to a blending/fade effect along the edges and are not very noticeable.


That's what I've done and it looks very nice, almost the same as regular z-sorted alpha blending.
Author Freeworld3Dhttp://www.freeworld3d.org
TohaTalib
TohaTalib
Thanks guys, it realy WORKS!!!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.