5.22. FragmentShader (property)

<fragmentShader> ‐ A fragment shader program

5.22.1. Attributes

NameTypeDefaults
xlink:hrefURINone (required)

5.22.2. Description

This element defines a fragment shader program that is used by a shader and defined as a child element of the shader element. The fragment programs are written in Cg language http://www.nvidia.com/developer that is documented in the Cg language online reference manual http://www.nvidia.com/developer.

The program is compiled by the Cg compiler (that must be installed on the platform). The external file reference, given by the xlink:href attribute, defines the URI reference (Uniform Resource Identifier) of the file that contains the bitmap image. The shader_cg_programs attribute of the texture_display element in the configuration file gives the path that is used to look for the fragment programs.

5.22.3. Expected child

None.

5.22.4. Example

The example below defines a fragment shader program named roubaud789-FS.cg.

<fragmentShader xlink:href="roubaud789-FS.cg"/>