<texture> reference in <pipeline> (//pfx/pipeline/texture)

A <texture> references an image that will be used by shaders in the pipeline

A <texture> references an image that will be used by shaders in the pipeline.

It can be one of three things:

  1. A texture loaded from disk, mentioned explicitly in the PFX file, in other words, the <texture> reference contains the name attribute of a <texture> element that has a path attribute.
  2. A texture that will be created by the implementation, in other words, the <texture> reference contains the name attribute of a <texture> element that does not have a path attribute.
  3. A texture that will be provided by the application, for example, automatically from models. In this case the <texture> reference has a semantic attribute.

If both name and semantic are provided, the texture referenced by name is regarded as a default value, but the semantic takes precedence and overrides it.

XML Attributes (<texture> element)

ATTRIBUTE

Description

name

(OPTIONAL) The value of the name attribute of a <texture> element. Either this attribute or the semantic attribute must be provided. If both are provided, the semantic takes precedence and the name attribute is regarded as a default value.

semantic

(OPTIONAL) An application-defined semantic of a texture, that will be used to select a texture from the renderable for this unit. If this attribute is defined, it supersedes the name attribute.

set

The descriptor set index the binding belongs to. Must be 0 or not defined on implementations that do not support descriptor sets.

binding

The index of the binding point in a descriptor set (in descriptor-set based implementations) or the texture unit (in non-descriptor-set based implementations).

minification,

magnification,

mipmap

(OPTIONAL) Filtering modes for the texture.

Valid values:

  • nearest (default for minification and magnification)
  • linear (default for mipmap for textures with > 1 mip level)
  • none (only valid for mipmap, default for textures without mipmaps)

wrap_x

(OPTIONAL) x is a valid texture axis (s/t/r, equivalently x/y/z, equivalently u/v/w). Specifies the texture wrapping mode for the selected axis.

Valid values:

  • repeat
  • clamp

apiVersion

(OPTIONAL) A string describing which API versions this element will be active for. If omitted, always active.