Difference between revisions of "ComposedShader"

From Web3D.org
Jump to: navigation, search
 
Line 3: Line 3:
  
 
<pre>
 
<pre>
CADAssembly : X3DGroupingNode, X3DProductStructureChildNode {
+
ComposedShader : X3DShaderNode, X3DProgrammableShaderObject {
   MFNode   [in]     addChildren
+
   SFNode   [in,out] metadata NULL [X3DMetadataObject]
  MFNode  [in]     removeChildren
+
   MFNode  [in,out] parts  []     [ShaderPart]
   MFNode  [in,out] children      []       [X3DProductStructureChildNode]
+
   SFBool   [out]   isSelected
   SFNode   [in,out] metadata      NULL    [X3DMetadataObject]
+
  SFBool  [out]   isValid
   SFString [in,out] name ""
+
   SFBool  [in]     activate
   SFVec3f  []      bboxCenter     0 0 0    (-∞,∞)
+
  SFString []      language  ""
   SFVec3f  []       bboxSize      -1 -1 -1 [0,∞) or −1 −1 −1
+
 
 +
   # And any number of:
 +
  fieldType []      fieldName
 +
  fieldType [in]     fieldName
 +
   fieldType [out]   fieldName
 +
  fieldType [in,out] fieldName
 
}
 
}
 
</pre>
 
</pre>
The CADAssembly node holds a set of assemblies or parts grouped together.
 
  
 +
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 ''children'' field can contain X3DProductStructureChildNode types. Each child will be either a sub-assembly or a part.
+
'''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 ''name'' field documents the name of this CADAssembly.
+
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 23: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.