Jump to content
  • Advertisement
Sign in to follow this  
Raziel1984

How to achieve Trasparency with glDrawElements

This topic is 2787 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

Hello everybody,
There is a good way to achieve a good traspoarency using the GlDrawElements method?

I suppose that the best way is to sort the index array but my big problem is that I have several Arrays of vertexes and normals and therefore several index arrays.

So this drive the next question?
There such an extension or a new technique to achieve a good trasparency effect without manually sorting all the triangles every frame?

And at the very last, if there is no better wa to achieve what i want what the fastest way to order a very large amount of triangles?

Thanks in advance to everybody will read and try to give me an answer.

Share this post


Link to post
Share on other sites
Advertisement
If part of the 3d model has transparency, separate it into 2 arrays and just draw the 2nd one last. You cant sort triangles by depth each frame if your model is rotating.

Share this post


Link to post
Share on other sites
Quote:
Original post by dpadam450
If part of the 3d model has transparency, separate it into 2 arrays and just draw the 2nd one last. You cant sort triangles by depth each frame if your model is rotating.


Sound quite simple this way but i need i very fast way to sort the array

Share this post


Link to post
Share on other sites
There is a method called Order Independent Transparency (OIT) which will avoid sorting, however it requires a few passes (your choice) to blend the layers.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!