Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've seen somewhere rendering technique that allows order-less rendering of partially transparent sprites/objects.

Though I can't remember what the technique is called, so I'm having trouble Googling it.

share|improve this question
    
Blending? –  Byte56 Nov 12 '12 at 19:04
    
Order-independent transparency? That's not really a technique though, and no technique under this group of effects doesn't even give a 100% correct result. –  snake5 Nov 12 '12 at 21:33
    
@Byte56 Just blending won't work if you draw further plane after the nearer, I'm looking for order-independent :) –  Miro Nov 13 '12 at 18:26
add comment

2 Answers

up vote 11 down vote accepted

There are lots of ways to achieve order-independent transparency.

The first (and I think oldest) type of algorithm is called depth peeling and works by "peeling" one transparency layer per pass (in the most basic version). This Nvidia paper for Dual Depth Peeling shows peeling two layers at the same time.

The second type which I only know as "order-independent transparency" (or OIT) works by storing transparent fragments during rendering (e.g. in a linked list) and then sorting them via compute shader. An example is contained in the DirectX 11 SDK, another (and lots of links) is here.

The next thing I remember is Order Independent Translucency which stores fragments by hijacking MSAA.

And last but not least there is a sample for Stochastic Transparency in the latest NVIDIA Graphics SDK 11 Direct3D

Hope this contains the algorithm you searched for.

share|improve this answer
3  
The per-pixel linked list is often called an A-buffer. The Humus article you linked to refers to the technique it describes as "stencil-routed A-buffer". Also worth mentioning is Marco Salvi's adaptive transparency, which is a per-pixel fragment list that intelligently discards fragments to keep the list under a fixed size without introducing too much error. –  Nathan Reed Nov 13 '12 at 0:13
1  
The actual oldest technique is screendoor transparency, which is still used in some console and mobile games due to its very high performance with modest hardware. –  Sean Middleditch Nov 13 '12 at 2:46
    
Seems I forgot screendoor transparency, thanks Sean. Also the related Alpha to coverage, which works like screendoor transparency, only on subpixel level. –  Jens Nolte Nov 13 '12 at 15:49
1  
@NathanReed Thanks for providing the Adaptive Transparency link, I didn't know this and it totally looks worth investigating. Maybe my engine soon supports OIT :) –  Jens Nolte Nov 13 '12 at 15:54
add comment

Jens covered the different ways pretty well. I would like to add that additive blending is also order independent and it can be used in limited use cases to achieve pretty good results with very little programming effort.

The following image is rendered with a color something like (-0.5, 1.0, -0.5) with additive blending. Positive color values are given for one color channel and negative values for the other two channels to not increase the average brightness.

Simultaneous additive and subtractive blending

share|improve this answer
2  
Whoa, additive blending with negative values? Never thought of that. –  Mr. Beast Nov 13 '12 at 15:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.