Sign in to follow this  

OIT (Order Independent Transparency)

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

Hi all,

When you sort transparent objects back-to-front it's not correct because you sort one distance but one object is large and demand a dynamic array to use a sort algorithm.

The modern research give solution to that, actually two solutions is there Intel and Morgan+Louis solution.

Here link to both methods :

https://software.intel.com/en-us/blogs/2013/07/18/order-independent-transparency-approximation-with-pixel-synchronization

http://jcgt.org/published/0002/02/09/

Weighted Blended Order-Independent Transparency looks to give more perfs but is it good to use it or the intel solution still the best ?

Thanks for the help

Edited by Alundra

Share this post


Link to post
Share on other sites

The Intel solution is based on a quite recent and, as far as I know, Intel-only extension. The Weighted Blended OIT is more general, but it is an approximation. There are also other methods (A-buffers for example). I don't think this is a solved problem and in many cases sorting is still probably the way to go. The best method depends on what you are trying to do and the scene you are trying to display.

Share this post


Link to post
Share on other sites

Maybe it's already sufficient for your application to sort the individual triangles back-to-front.

You can store the vertices statically on the gpu and issue a sorted list of indices in every frame,

for example. It's not too bad.

 

If you really need perfect transparency you may consider depth peeling.

It's a multipass technique and runs on older hardware.

 

The cheapest trick is to draw in any order and tell everyone it's correct.

Most people don't notice alpha-blending errors anyways :)

Share this post


Link to post
Share on other sites

I've played with the Weighted Blended OIT method.  There is a lot to like about it:

 

  • Simple to implement
  • Performance is very good
  • Combines nicely with offscreen particles (where particles are rendered into a downsampled offscreen buffer)
  • Although it is an approximation, it actually fixes the visual "popping" that occurs with particle sorting

However, one big drawback with it is that it doesn't support emissive transparency.  Meaning effects like flames and such, done with additive blending.

 

At first glance it looks like it should work because the method works with RGB in premultiplied form, so you would think that you could just pass in an alpha of zero for emissive and it might just work.  Unfortunately not.  The weight function is scaled by alpha, so when alpha is zero, the weight also goes to zero and the effect disappears.

Share this post


Link to post
Share on other sites

The Intel solution can give exact results if you accept the performance hit (in this case it's a classic linked list method). The quality trade-off come from removing some layer while emulating the light transmitance with all layers.

 

It can be simplified a lot using Pixel sync on Haswell through GL_INTEL_fragment_shader_ordering extension on OpenGL (don't know for DX11 but Grid 2 uses it).

GL_INTEL_fragment_shader_ordering basically allows to update alpha value on the fly because you can ensure that 2 fragments shader invocation won't access the same memory location at the same time.

GL_INTEL_fragment_shader_ordering is also available on AMD GCN with the latest driver.

Share this post


Link to post
Share on other sites

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