Home -> IRenderPassNode -> EnableAttachmentMultiSamplingResolution
Description
The EnableAttachmentMultiSamplingResolution method is used when multisample anti-aliasing (MSAA) is being used. This method sets up a task to resolve the target multisampled framebuffer attachment. A resolve operation takes a multisampled framebuffer attachment, and performs the appropriate averaging to output a resolved version with a single sample per pixel to a target texture.
Important
This operation is only valid for IRenderPassNode objects which are bound to an IFrameBuffer object which have texture targets. Window surfaces cannot make use of multisample anti-aliasing.
Important
Only a single resolve operation can be defined for a given source framebuffer attachment per render pass. Calling the EnableAttachmentMultiSamplingResolution method for a framebuffer attachment that has previously had a resolve target set will replace the previous resolve operation.
Warning
When a render pass is disabled using the SetIsEnabled method, multisample resolve operations don't execute either. Where you are conditionally enabling render passes for a frame, it may be appropriate to use empty render passes that you leave enabled to perform attachment resolve operations. Empty render passes still perform resolve operations, as long as the render pass has not been disabled.
Usage
void EnableAttachmentMultiSamplingResolution(IFrameBuffer::AttachmentType attachmentType, size_t attachmentIndex, size_t resolveAttachmentIndex = std::numeric_limits<size_t>::max());
Argument list
- type [IFrameBuffer::AttachmentType]
- The type of the target framebuffer attachment
- index [size_t]
- The index of the framebuffer attachment within the selected attachment type, to use as a source for the resolve operation.
- index [size_t]
- The index of the target framebuffer resolve attachment within the selected attachment type. If this index is left at its default value, the resolve attachment index will take the source attachment index as the resolve attachment index too.