devsh wrote:
I cannot really see the benefits of this technique compared to deferred depth peeling (with the exception of speed of course). The lightning done at low resolution impairs the scene and specular most notably, i'd hate to see what it does to normal maps. And anyway, if you are going to half the resolution why not half the normal map texture resolution too?
You don't have to use 50% res if you don't want to -- at 100% LBuffer res, it's basically the same technique as a "light pre pass" deferred renderer (except with transparency support). In my final implementation, I'd like to expose this % value as a setting that the user can tweak to see the performance/quality tradeoffs.
Quote:
I must admit the alpha support is pretty impressive, could someone explain it to me?
The LBuffer is split up into "blocks" of 2x2 pixels. Opaque surfaces write lighting results into all 4 pixels of a block, but transparent surfaces only write into one of the pixels in a block. This gives you up to 4 "layers" of lighting information, but means that transparent objects are only lit at half resolution
(and if you're using a 50% LBuffer, that's half of 50%, or 1/4 resolution). Also, if an opaque surface is covered by alpha layers, then it's lighting quality also degrades (because the alpha lighting info overwrites most of the opaque lighting info).
When reading lighting values from the LBuffer, some shader magic is used to ignore any samples that are from other objects/layers, and perform linear interpolation from the nearest 4 valid samples.