Sign in to follow this  
Raziel1984

How to achieve Trasparency with glDrawElements

Recommended Posts

Raziel1984    100
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
Raziel1984    100
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
V-man    813
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

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