Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.3

Bring Colours to Your Life.

X3D Reference



ShaderProgram is contained by ProgramShader and provides the source and interface to a self-contained program that occupies one part of the rendering process: either a vertex or fragment shader.

The ShaderProgram node belongs to the Shaders component and its container field is programs. It is available since X3D version 3.0 or later.


* Derived from multiple interfaces.


SFNode [in, out] metadata NULL [X3DMetadataObject]

Metadata are not part of the X3D world and not interpreted by the X3D browser, but they can be accessed via the ECMAScript interface.

SFString [ ] type "VERTEX" ["VERTEX"|"FRAGMENT"]

Type indicates whether this ShaderProgram is a vertex or fragment (pixel) shader.


Do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.

MFString [in, out] url [ ] [URI]

Location and filename of shader. Multiple locations are more reliable, and including a Web address lets e-mail attachments work.


MFString arrays can have multiple values, so separate each individual string by quote marks "http://www.web3d.org" "http://www.web3d.org/about" "etc." XML encoding for quotation mark " is " (which is called a character entity). Can replace embedded blank(s) in url queries with %20 for each blank character.


Strictly match directory and filename capitalization for http links! This is important for portability. Some operating systems are forgiving of capitalization mismatches, but http/https and other operating systems are not.

See Also

X3D Scene Authoring Hints, urls



  • ShaderProgram contains IS/connect and field definitions.
  • ShaderProgram can contain a CDATA section of plain-text source code.

Browser Compatibility

Titania X_ITE
yes no

External Links