Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.5

Bring Colours to Your Life.

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

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.

Example

ShaderPart

XML Encoding

Classic Encoding

JSON Encoding

Browser Compatibility

Titania X_ITE
yes yes

External Links

Cookies and other Technologies

By clicking »Accept« or continuing to use the site, you agree to the use of CREATE3000 and third-party cookies and other similar technologies to enhance your browsing experience, analyze and measure your engagement with our content, and provide more relevant ads on CREATE3000 websites and others. Learn more about cookies. You can withdraw your consent at any time.