Effect framework: Difference between revisions

m
syntax for xml
(Created page WIP)
 
m (syntax for xml)
Line 48: Line 48:
To apply an effect to a model or part of a model use:
To apply an effect to a model or part of a model use:


<syntaxhighlight lang="xml">
<effect>
<effect>
<inherits-from>Effects/light-cone</inherits-from>
<inherits-from>Effects/light-cone</inherits-from>
<object-name>Cone</object-name>
<object-name>Cone</object-name>
</effect>
</effect>
</syntaxhighlight>


where <inherits-from> </inherits-from> contains the path to the effect you want to apply.
where <inherits-from> </inherits-from> contains the path to the effect you want to apply.
Line 60: Line 62:
Chrome, although now implemented as an effect, still retains the old method of application:
Chrome, although now implemented as an effect, still retains the old method of application:


<syntaxhighlight lang="xml">
<animation>
<animation>
<type>shader</type>
<type>shader</type>
Line 66: Line 69:
<object-name>windscreen</object-name>
<object-name>windscreen</object-name>
</animation>
</animation>
</syntaxhighlight>


in order to maintain backward compatibility.
in order to maintain backward compatibility.
Line 185: Line 189:
the 'generate' clause is present in the effect file. Exemple :
the 'generate' clause is present in the effect file. Exemple :


<syntaxhighlight lang="xml">
<generate>
<generate>
<tangent type="int">6</tangent>
<tangent type="int">6</tangent>
Line 190: Line 195:
<normal type="int">8</normal>
<normal type="int">8</normal>
</generate>
</generate>
</syntaxhighlight>


Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.
Line 200: Line 206:
be bound to an attribute in the program clause, like this :
be bound to an attribute in the program clause, like this :


<syntaxhighlight lang="xml">
<program>
<program>
<vertex-shader>my_vertex_shader</vertex-shader>
<vertex-shader>my_vertex_shader</vertex-shader>
Line 211: Line 218:
</attribute>
</attribute>
</program>
</program>
</syntaxhighlight>


attribute names are whatever the shader use. The index is the one  
attribute names are whatever the shader use. The index is the one  
574

edits