Skip to content

jvm-graphics-labs/oit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OIT

Repository containing JOGL examples regarding the OIT techniques on old (GL3) and modern (GL4) OpenGL

It requires:

I modified the code through:

  • a general cleaning of unused objects (like g_dualBackBlenderFboId inside Dual Depth Peeling)

  • a substitution of Nvidia enums with standard ones (like GL_FLOAT_RG32_NV with GL_RG32F)

  • specifying the right number of components on server side (like GL_RGB with GL_RG) and on client side (

    like `out vec2 outputColor;` 
    
    instead `out vec4 outputColor;`)
    
  • specifying always everything, leaving nothing to be padded by the driver (

    like `outputColor.rgb = frontColor.rgb + opaqueColor * frontColor.a;` 
    
    with `outputColor = vec4(frontColor.rgb + opaqueColor * frontColor.a, 1);`)
    
  • implementation of the OIT methods over plain opaque geometry rendered normally

  • improving of dual depth peeling and depth peeling algorithms by performing the occulsion query also at the init stage in order to save potentially an additional geometric pass.

Package gl3 is instead my current GL3 rewriting, I divided all the different methods of their program in order to make it more readable, as following:

  • ddp -> Dual Depth Peeling
  • dp -> Depth Peeling
  • ws -> Weighted Sum
  • wa -> Weighted Average
  • wb -> Weighted Blended

The newest algorithm of all is the Weighted Blended, OIT much faster! Here some interesting links if you want to deepen:

If you have GL4, you can look for the fastest wb algorithm in the gl4 package or, otherwise, you can still implement in GL3 at a small addition cost, oit.gl3.wb.

Under originalBavoilMyers you can find the original program of Louis Bavoil and Kevin Myers, they work is the "Order Independent Transparency with Dual Depth Peeling" paper. I have slighlty modified it, just the minimum to get it working.

About

Java Order Independent Transparency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published