←back to thread

602 points todsacerdoti | 3 comments | | HN request time: 0.604s | source
Show context
hoseja ◴[] No.42193946[source]
What's the catch?
replies(2): >>42194042 #>>42197068 #
1. armada651 ◴[] No.42197068[source]
The catch is the alpha-blending, which is something modern games avoid doing as much as possible which is why so many games use that dither-pattern transparency you may have seen before.

To do alpha blending correctly you need to blend with what's behind the object. But what if you haven't rendered what's behind the object? You won't have anything to blend with!

This means you first have to sort all the objects you're rendering and render them in-order. It also means you can't use a depth pre-pass because you need to draw what's behind the object even for the parts you already know will be covered by the object in front of it. There's a bunch of more reasons to avoid it, but those are some of the basic ones.

An alternative is to draw only a few pixels of what's behind the object you're rendering at the edges of the object that's in front and then alpha blend those extra samples together, which seems to be the solution proposed in the article for actual 3D games. So then the catch is that you're doing MSAA, just with high-quality blending rather than the standard averaging of the samples.

replies(1): >>42200303 #
2. pezezin ◴[] No.42200303[source]
Now that I am delving into the retro-gaming world, I find it funny that 30 years ago gamers lambasted the Sega Saturn for using dithering patterns instead of proper transparencies, only for the same technique to come back decades later.
replies(1): >>42202767 #
3. account42 ◴[] No.42202767[source]
The difference is higher pixel densities and being able to have subpixel dithering with msaa buffers.