Guys,
The Problem
MSAA breaks the [edit]normal[/edit] vision glow algorithm - artifacts are lights poking/seen through walls.
The MSAA issue with [edit]normal[/edit] vision glow algorithm :
(1) Render the scene normally, render every glowing object (it's a texture or object issue in normal vision, not a light intensity issue) with the stencil op at SET (to 1) and at SET (to 0) when it's not glowing.
(2) Replace the render target by a texture (cleared) but keep the stencil buffer, render every glowing object with it's associated glowing texture but only render if the stencil bit in the buffer is equal to 1.
(3) Do post processing filtering on the glow buffer (similar to the one in night vision)
(4) Add the result into the original render target to create the glow effect.
Step (2) is the problem. The Stencil/Depth buffer is allocated multisample but the render target (a texture) can't be allocated multisample... This means you "merge" a multisample surface (depth/stencil) with a non multisample surface (texture) and this is simply not allowed in DirectX.
Suggestions appreciated.
The Problem
MSAA breaks the [edit]normal[/edit] vision glow algorithm - artifacts are lights poking/seen through walls.
The MSAA issue with [edit]normal[/edit] vision glow algorithm :
(1) Render the scene normally, render every glowing object (it's a texture or object issue in normal vision, not a light intensity issue) with the stencil op at SET (to 1) and at SET (to 0) when it's not glowing.
(2) Replace the render target by a texture (cleared) but keep the stencil buffer, render every glowing object with it's associated glowing texture but only render if the stencil bit in the buffer is equal to 1.
(3) Do post processing filtering on the glow buffer (similar to the one in night vision)
(4) Add the result into the original render target to create the glow effect.
Step (2) is the problem. The Stencil/Depth buffer is allocated multisample but the render target (a texture) can't be allocated multisample... This means you "merge" a multisample surface (depth/stencil) with a non multisample surface (texture) and this is simply not allowed in DirectX.
Suggestions appreciated.