Heuristic42
Blog
Opengl
Meta
Rendering
1
comment
Dec 15 at 4:39
Matrices
Hello! Are you looking to elevate your online business with a p…
–
anonymous
comment
Nov 27 at 0:30
DerBard: Custom Split Mechanical Keyboard Prototype
hello
–
anonymous
comment
Nov 19 at 15:47
Matrices
[deleted]
–
anonymous
created
Oct 20 at 20:30
Iterators: pointers vs cursors
You're already doing both of these by hand. This post emphaisze…
–
pknowles
comment
Oct 10 at 10:27
Matrices
[deleted]
–
anonymous
comment
Oct 4 at 19:12
Matrices
[deleted]
–
anonymous
comment
Sep 30 at 18:51
Matrices
[deleted]
–
anonymous
comment
Sep 23 at 16:15
Matrices
[deleted]
–
anonymous
comment
Sep 21 at 6:52
Contributing
I kind of predicted what was bound to happen when my favourite …
–
anonymous
comment
Sep 7 at 1:21
Route contention when running docker and a VPN
Thank you for this. Between this and the overwriting of iptabl…
–
anonymous
comment
Sep 6 at 17:57
Making a real EMF Reader
Sorry for the random quoted text comments. I am one of those p…
–
anonymous
comment
Sep 6 at 17:48
Making a real EMF Reader
["ove! Play a tone with a buzzer and has 5 LEDs to show the “EM…
–
anonymous
comment
Sep 6 at 17:47
Making a real EMF Reader
["easure direction Measure the magnetic fie"](#q107-644-685)
–
anonymous
comment
Aug 20 at 17:01
Matrices
[deleted]
–
anonymous
comment
Aug 11 at 22:32
Matrices
[deleted]
–
anonymous
edited
Jun 8 at 22:29
Rethinking writing files with memory mapping and C++
This post introduces the motivation behind the [decodless C++ o…
–
admin
created
Jun 8 at 22:16
Rethinking writing files with memory mapping and C++
This post introduces the motivation behind the [decodless C++ o…
–
pknowles
comment
Jun 5 at 13:36
Contributing
[deleted]
–
anonymous
comment
Apr 19 at 11:24
Matrices
[deleted]
–
anonymous
comment
Apr 13 at 0:25
Matrices
[deleted]
–
anonymous
comment
Apr 5 at 9:43
Matrices
[deleted]
–
anonymous
comment
Mar 27 at 17:19
Matrices
[deleted]
–
anonymous
comment
Mar 25 at 4:59
Matrices
[deleted]
–
anonymous
comment
Mar 5 at 15:39
Matrices
[deleted]
–
anonymous
…
View All
Log in
Order Independent Transparency (OIT)
leave this field blank to prove your humanity
Slug
*
A URL path component
Parent page
<root>
rendering/:Article2:3D Rendering (Computer Graphics)
--- rendering/cameras/:Article11:Cameras
--- rendering/matrices/:Article12:Matrices
------ rendering/matrices/projection/:Article14:Projection Matrix
--- rendering/vectors/:Article13:Vectors
--- rendering/geometry/:Article62:3D Geometry
------ rendering/geometry/triangle_meshes/:None
--- rendering/shading/:Article64:Shading
------ rendering/shading/transparency/:Article70:Transparency and Alpha Blending
--- rendering/lights/:Article65:Lights
--- rendering/rasterization/:None
------ rendering/rasterization/deepimage/:Article72:Deep Image
--- rendering/shadows/:Article67:Shadows
--- rendering/spaces/:Article68:Vector Spaces
------ rendering/spaces/tangent_space/:Article69:Tangent Space
------ rendering/spaces/clip_space/:Article89:Clip Space
--- rendering/rotations/:None
--- rendering/images/:Article74:<unset>:Images
------ rendering/images/mipmapping/:Article75:<unset>:Mipmapping
--- rendering/materials/:None
opengl/:Article3:OpenGL Tutorials
--- opengl/oit/:Article7:Order Independent Transparency (OIT)
--- opengl/framebuffer/:Article71:The Framebuffer
meta/:Article4:Pages About This Site
--- meta/contribute/:Article5:Contributing
--- meta/bugs/:Article9:Bugs
--- meta/about/:Article10:Why does this website exist?
The parent page this belongs to.
Article title
*
Article revisions must have a non-empty title
Article body
*
This page is incomplete, and for the moment just here as a placeholder describing the OIT implementations on [github](https://github.com/pknowles?tab=repositories). Rendering transparency is a non-trivial problem in computer graphics because colour has to be blended in order. See opengl.org's [Blending](https://www.opengl.org/wiki/Blending) and [Transparency Sorting](https://www.opengl.org/wiki/Transparency_Sorting). It's common to just render transparent geometry such as particles after opaque geometry and disabling depth writing (with `glDepthMask`), ignoring sorting. Depending on the applications the artefacts may not be that noticeable. For applications where correct transparency is necessary, surfaces must be rendered in sorted order. Sorting per-polygon can be expensive and in some cases requires subdividing triangles. An alternative is capturing all fragments and sorting per-pixel, post-rasterization. This is *order independent transparency* (OIT). The first OIT methods rendered the scene many times or accepted fragment collisions (race conditions) due to fragments being processed in parallel. Recently (~2009-10), with atomic operations and arbitrary global memory writes from shaders, a new class of OIT techniques that accurately capture all fragments in a single pass became possible, which are now discussed. The following is needed for single pass OIT: 1. Atomic operations in the fragment shader to get a unique index for writing fragment data. 2. A mechanism for storing per-pixel lists of fragments. 3. A fast way to sort per-pixel lists of fragments. 4. An iteration through sorted fragments, blending in order for final per-pixel colour. Capturing and storing fragments are grouped into the rendering pass, to construct a *deep image*. This is described in [*Efficient Layered Fragment Buffer (LFB) Techniques*](/research). LFB code can be found here: [**github.com/pknowles/lfb**](https://github.com/pknowles/lfb), and depends on [**pyarlib**](https://github.com/pknowles/pyarlib). It implements four methods, abstracting them behind a common API: 1. Basic 3D array (a fixed-sized list per pixel). 2. Per-pixel linked lists. 3. [Linked list of fragment pages](http://blog.icare3d.org/2010/07/opengl-40-abuffer-v20-linked-lists-of.html) 4. Linearized per-pixel arrays (using a prefix sum scan). Next, the deep image is sorted and composited in the same full-screen pass. Copying fragments to a conservatively sized local array and using insertion sort is standard, but performance can be greatly improved with [*Backwards Memory Allocation* (BMA) and *Register-based Block Sort* (RBS)](/research). Code for sorting and compositing, using the above LFB code, is available here: [**github.com/pknowles/oit**](https://github.com/pknowles/oit) This applications includes BMA, RBS and CUDA sorting and compositing, and a few combinations with a benchmarking framework.
Toggle Preview
Edit message
*
A description of the changes made
Discard Draft
Save Draft
leave this field blank to prove your humanity
Flag
the thing you clicked
for moderator attention.
Reason choice:
Spam, promoting, advertising without disclosure
Rude, inappropriate, generally offensive
Too arrogant or demeaning to others
Other
Reason:
The reason for raising the flag
Error