Difference between revisions of "ComposedShader"

From Web3D.org
Jump to: navigation, search
Line 20: Line 20:
  
 
The ComposedShader node defines a shader where the individual source files are not individually programmable. All access to the shading capabilities is defined through a single interface that applies to all parts.
 
The ComposedShader node defines a shader where the individual source files are not individually programmable. All access to the shading capabilities is defined through a single interface that applies to all parts.
 +
  
 
'''EXAMPLE'''  OpenGL Shading Language (GLSL)
 
'''EXAMPLE'''  OpenGL Shading Language (GLSL)
 +
  
 
The ''isValid'' field adds an additional semantic indicating whether the current shader parts can be linked together to form a complete valid shader program.
 
The ''isValid'' field adds an additional semantic indicating whether the current shader parts can be linked together to form a complete valid shader program.
 +
  
 
The ''activate'' field forces the shader to activate the contained objects. The conditions under which a activate may be required are described in the ''I.5 Event model'' section of the X3D specification.
 
The ''activate'' field forces the shader to activate the contained objects. The conditions under which a activate may be required are described in the ''I.5 Event model'' section of the X3D specification.
  
 
* [[Node Reference]]
 
* [[Node Reference]]

Revision as of 16:00, 1 February 2006

ComposedShader

ComposedShader : X3DShaderNode, X3DProgrammableShaderObject {
  SFNode   [in,out] metadata NULL [X3DMetadataObject]
  MFNode   [in,out] parts  []     [ShaderPart]
  SFBool   [out]    isSelected
  SFBool   [out]    isValid
  SFBool   [in]     activate
  SFString []       language  ""  

  # And any number of:
  fieldType []       fieldName
  fieldType [in]     fieldName
  fieldType [out]    fieldName
  fieldType [in,out] fieldName
}

The ComposedShader node defines a shader where the individual source files are not individually programmable. All access to the shading capabilities is defined through a single interface that applies to all parts.


EXAMPLE OpenGL Shading Language (GLSL)


The isValid field adds an additional semantic indicating whether the current shader parts can be linked together to form a complete valid shader program.


The activate field forces the shader to activate the contained objects. The conditions under which a activate may be required are described in the I.5 Event model section of the X3D specification.