Jump to content
  • Advertisement
Sign in to follow this  

Colour Key And Z Buffer

This topic is 4744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does any one know if colour key values in a texture get written to the z buffer? If so can i turn it off? Cheers. Jimmy.

Share this post


Link to post
Share on other sites
Advertisement
I dont know exacly what you mean but.
Something like this?.. well it disable the color back on the texture.


glDisable( GL_LIGHTING );
glDisable(GL_FOG);
glEnable( GL_ALPHA_TEST );
glAlphaFunc( GL_GREATER, 0. );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

BindTexture()....

renderThing..

glDisable( GL_BLEND );
glEnable(GL_FOG);
glEnable( GL_LIGHTING );





using the glAlphaFunc( GL_GREATER, 0. );

Share this post


Link to post
Share on other sites
Your a god!!!

It was the alpha func that i needed to do.

That has fixed it, cheers.

P.S I'm working with DirectX.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!