Rendering models with transparent textures

I was having problems rending low polygon trees in my scene. It was because they used transparent textures which are always problemic. I found this artical that helped me greatly:

http://www.sjbaker.org/steve/omniv/alpha_sorting.html

The solution was to render all opaque objects first, then do:

glAlphaFunc(GL_GREATER, 0.1f);
glEnable(GL_ALPHA_TEST);
and now every thing renders perfectly

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: