Titania X3D Editor

It starts with you!

Titania v3.0.4

It starts with you!

X3D Reference

ShaderPart

ShaderPart

ShaderPart defines the source for a portion of source code used by a ComposedShader node. The source is not required to be a complete shader for all of the vertex/fragment processing.

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

Hierarchy

* Derived from multiple interfaces.

Fields

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.

Warning

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.

Hints

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.

Warning

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

Description

Hints

  • ShaderPart can contain a CDATA section of plain-text source code.
  • ShaderPart subprograms are written in the same language, which is specified in the parent ComposedShader node.

Warning

  • ShaderPart contains no field definitions.

Browser Compatibility

Titania X_ITE
yes yes

External Links