<subpass> (//pfx/effect/pass/subpass)

A <subpass> defines a set of rendering operations. A subpass can either form part, or the entirety of a pass.

A subpass may define an entire render pass, or draw operations that write to intermediate or final targets. If only one subpass is defined, it can and should be omitted as well.

In typical implementations, the objects which are going to be rendered are added to subpasses. Each subpass will reference one or more pipelines. The pipeline which is most suitable for the object is selected automatically. This gives greater ease of use and flexibility.

<subpass> items hence contain <pipeline> tags that reference //pfx/pipeline elements. See the <pipeline> tag for this mechanism.

XML Attributes (<subpass> element)

ATTRIBUTE

Description

name

(OPTIONAL) A unique text identifier for this subpass. Because the effects are considered ordered, the implementation can always also identify it by index. (e.g. effect[0].passes[0].subpasses[0])

targetX

(OPTIONAL) X can be either 0, 1, 2, or 3.

The value of this attribute is either default (can be omitted for attachment 0), or the name of a <texture> element that was defined with the “format” element (not loaded from disk).

This texture will be used to render to the corresponding attachment. If omitted, the default framebuffer will be used in attachment 0 (same as defining <pass target0=“default”…>).

inputX

(OPTIONAL) X can be either 0, 1, 2, or 3.

The value refers to a <texture> element that will be used as Input Attachment X by this subpass.

It is usual that this element will be a target attachment of a previous subpass. The actual number X refers to a pipeline object, in which it will be defined as <pipeline><input index=“X”…>

usesDepthStencil

(OPTIONAL) If set to false, the subpass does not use the depth/stencil attachment.

The default value is true.

Child elements (<subpass> element)

ELEMENT

Description

<pipeline>

References a pfx <pipeline> element that can be used to render for this subpass.