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

A <condition> element contains a condition that must be satisfied so the containing pipeline element can be chosen to render an object

A <condition> element is a condition that must be satisfied so that a pipeline can be used to render something. Conditions generally are a combination of required/requiredNotPresent, and AttributeSemantic/UniformSemantic.

A typical case would be to have a pipeline to support skinned meshes (exported with Bones), or non-skinned meshes (exported without Bones).

In the skinned case, a pipeline might have a condition:
<condition type=”requiredAttributeSemantic” name=”BONEWEIGHT”/>
and in the non-skinned case, a pipeline might have a negative condition:
<condition type=”requiredAttributeSemanticNotPresent” name=”BONEWEIGHT”/>

This way, all objects whose mesh has a BONEWEIGHT attribute would use to the Skinning pipeline, and all that do not would use the default pipeline.

XML Attributes (<condition> element)




Describes how to use the condition. Valid values:

  • requiredAttributeSemantic
  • requiredUniformSemantic
  • requiredAttributeSemanticNotPresent
  • requiredUniformSemanticNotPresent