Changes

Effect Framework

192 bytes added, 04:53, 1 September 2019
m
syntax for xml
To apply an effect to a model or part of a model use:
<syntaxhighlight lang="xml">
<effect>
<inherits-from>Effects/light-cone</inherits-from>
<object-name>Cone</object-name>
</effect>
</syntaxhighlight>
where <inherits-from> </inherits-from> contains the path to the effect you want to apply.
Chrome, although now implemented as an effect, still retains the old method of application:
<syntaxhighlight lang="xml">
<animation>
<type>shader</type>
<object-name>windscreen</object-name>
</animation>
</syntaxhighlight>
in order to maintain backward compatibility.
the 'generate' clause is present in the effect file. Exemple :
<syntaxhighlight lang="xml">
<generate>
<tangent type="int">6</tangent>
<normal type="int">8</normal>
</generate>
</syntaxhighlight>
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.
be bound to an attribute in the program clause, like this :
<syntaxhighlight lang="xml">
<program>
<vertex-shader>my_vertex_shader</vertex-shader>
</attribute>
</program>
</syntaxhighlight>
attribute names are whatever the shader use. The index is the one
493
edits