color

 

Tag: shader
Parent tag: map
Attributes:

  • fromMaterial (string) – specifies the name of the material which defines the shaders uniforms
  • fromLibrary (string) – specifies the name of the material library where the material can be found.
  • ambient (bool) – default false
  • diffuse (bool) – default false
  • emissive (bool) – default false
  • specular (bool) – default false
  • shininess (bool) – default false

Child tags: none

The attributes regarding the color definition act as flags on wheter to import that particular component from the color of the specified material.

Example:
– In the example below we are only “injecting” the shininess value

	
    <injectionMaps>
        <map toMaterial="*">
            <!-- only fields with true are used, default is false -->
            <color fromMaterial="shine" fromLibrary="lighting" 
                                                ambient="false" 
                                                diffuse="false" 
                                                emission="false" 
                                                specular="false" 
                                                shininess="true" />
        </map>
    </injectionMaps>