instantreality 1.0

Component:
Shaders
Status:
fully implemented
Structure type:
concrete
Standard:
X3D3.1

ProgramShader

The ProgramShader node defines a shader that can consist of one or more individually programmable, self contained pieces. Each piece, represented by a ShaderProgram node, shall be a self-contained source that does not rely on any other source file and can manage one part of the programmable pipeline (e.g. vertex or fragment processing).

Inheritance

Code

XML encoding
<ProgramShader language='auto'
logFeature=''
 />
Classic encoding
ProgramShader {
	language "auto"
	logFeature [""]
}

Interface

Filter: X3D only | Avalon only | All
id Name DataType PartType Default ValueType Description
SFBool activate SFBool inputOnly The activate field forces the shader to activate the contained objects.
SFBool isSelected SFBool outputOnly The isSelected output field is used to indicate that this shader instance is the one selected for use by the browser. A TRUE value indicates that this instance is in use.
SFBool isValid SFBool outputOnly The isValid field is used to indicate whether the current shader objects can be run as a shader program.
SFString language SFString initializeOnly auto CG; GLSL; HLSL Indicates to the browser which shading language is used for the source file(s). This field may be used as a hint for the browser if the shading language is not immediately determinable from the source.
MFString logFeature MFString inputOutput state, child, parent, route, eventIn, eventOut controls the logging of changes, state: log state changes (e.g. live), child: log child add/remove, parent: log parent add/remove, route: log route add/remove; eventIn: log receiving of events, eventOut: log sending of events: guiView, runtime system should create node-view, guiEdit: runtime system should create node-editeverything: log everything
SFNode metadata SFNode inputOutput MetadataObject container for payload metadata inside MetadataSet element
MFNode programs MFNode inputOutput ShaderProgram Contains zero or more ShaderProgram node instances. Hint: In general, only two ShaderProgram instances will be needed: one each for vertex and fragment processing. Each shader language annex shall refine the required behaviour for processing this field.