opengl - Deferred shading anti-aliasing -


many people note msaa not work deferred shading. why that? sounds okay in head.

according wikipedia:

... due separating lighting stage geometric stage, hardware anti-aliasing not produce correct results anymore since interpolated subsamples result in nonsensical position, normal, , tangent attributes.

can explain that?

what other aa alternatives have?

multisampling work deferred rendering. deferred rendering changes price pay it.

multisampling based on general idea need execute fragment shader once of samples covered particular triangle's rasterization within pixel. while write multiple samples (like super sampling), execute fragment shader once, saving lots of texture accesses. same value written across samples in multisample image.

that still doable deferred rendering. geometry pass still makes sense under multisampling rules. or @ least, sense ever has.

the problem have during lighting pass.

because geometry pass multisampled, lighting pass must read multisampled data. cannot multisample resolve of geometry buffers (that "nonsensical" part wikipedia talking about); lighting pass must read each sample , process it. per light. if did 8x multisample operation, fragment shader have run eight times each pixel. per light.

that's not cost lot of people willing pay.

the alternatives of "i can't believe it's not anti-aliasing" techniques, fxaa or whatever.


Comments