constants
Tag: constants
Parent tag: assets
Attributes (none)
Child tags:
This tag allows the definition of numeric constants that can be used anywhere in the project where a number is used. Constants can be used to replace numeric values in both the project and material library files. Note, however, that constants are only used during project loading, after the project is loaded the constants are gone.
An example of an application of this feature is when the same number appears a number of times in a project. For instance, consider that we are testing an algorithm and want to be able to quickly change screen resolution during our tests. This may imply changing the project’s width and height, viewport definition, render targets size, textures, buffers, and other items. Using a constant one can use that constant for every relevant item. Hence, to change the resolution only a single value, that of the constant, needs to be changed, saving time and more importantly preventing project errors.
The tag constants
contains a set of tags constant
.
<constants> <constant name="GridSize" value = 512 /> <constant name="CompRO" value = 64 /> <!-- GridSize/8 --> </constants>