Difference between revisions of "ComposedShader"

From Web3D.org
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
* [[Node Reference]]
 
* [[Node Reference]]
 
==ComposedShader==
 
==ComposedShader==
 +
 +
Specification Link: [http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#ComposedShader ComposedShader]
  
 
<pre>
 
<pre>
 
ComposedShader : X3DShaderNode, X3DProgrammableShaderObject {
 
ComposedShader : X3DShaderNode, X3DProgrammableShaderObject {
   SFNode  [in,out] metadata NULL [X3DMetadataObject]
+
   SFNode  [in,out] metadata   NULL [X3DMetadataObject]
   MFNode  [in,out] parts []     [ShaderPart]
+
   MFNode  [in,out] parts     []   [ShaderPart]
 
   SFBool  [out]    isSelected
 
   SFBool  [out]    isSelected
 
   SFBool  [out]    isValid
 
   SFBool  [out]    isValid
 
   SFBool  [in]    activate
 
   SFBool  [in]    activate
   SFString []      language ""   
+
   SFString []      language   ""   
  
 
   # And any number of:
 
   # And any number of:
Line 19: Line 21:
 
</pre>
 
</pre>
  
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.
+
==DTD Validation==
 +
 
 +
===Children===
 +
 
 +
Children must appear as follows:
 +
 
 +
# Any number, including zero, of user defined fields.
 +
# A single, optional IS.
 +
# A single, optional node derived from ''X3DMetadataObject'' for the ''metadata'' field.
 +
# Any number, including zero, of either:
 +
## [[ShaderPart]]
 +
## An appropriately typed Prototype node
 +
 
 +
===Attributes===
 +
 
 +
* There is no check that the value in the ''language'' field is acceptable.
 +
 
 +
==Schema Validation==
 +
 
 +
===Children===
 +
 
 +
Children must appear as follows:
 +
 
 +
# Any number, including zero, of user defined fields.
 +
# A single, optional IS.
 +
# A single, optional node derived from ''X3DMetadataObject'' for the ''metadata'' field.
 +
# Any number, including zero, of either:
 +
## [[ShaderPart]]
 +
## An appropriately typed Prototype node
 +
 
 +
===Attributes===
  
'''EXAMPLE'''  OpenGL Shading Language (GLSL)
+
* There is no check that the value in the ''language'' field is acceptable.
  
The ''isValid'' field adds an additional semantic indicating whether the current shader parts can be linked together to form a complete valid shader program.
+
==Schematron validation==
  
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.
+
TBD
  
 
* [[Node Reference]]
 
* [[Node Reference]]

Latest revision as of 02:46, 27 August 2015

ComposedShader

Specification Link: 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
}

DTD Validation

Children

Children must appear as follows:

  1. Any number, including zero, of user defined fields.
  2. A single, optional IS.
  3. A single, optional node derived from X3DMetadataObject for the metadata field.
  4. Any number, including zero, of either:
    1. ShaderPart
    2. An appropriately typed Prototype node

Attributes

  • There is no check that the value in the language field is acceptable.

Schema Validation

Children

Children must appear as follows:

  1. Any number, including zero, of user defined fields.
  2. A single, optional IS.
  3. A single, optional node derived from X3DMetadataObject for the metadata field.
  4. Any number, including zero, of either:
    1. ShaderPart
    2. An appropriately typed Prototype node

Attributes

  • There is no check that the value in the language field is acceptable.

Schematron validation

TBD