Sign in to follow this  

How to achieve Trasparency with glDrawElements

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

This topic is 2573 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this