assets
Tag: assets
Parent tag: project
Attributes: none
Child tags:
In Nau3D, assets are items that can be used in the pipeline definition, and in the shaders themselves.
<project name="myProject"> <assets> <constants> ... </constants> <attributes> ... </attributes> <scenes> ... </scenes> <viewports> ... </viewports> <cameras> ... </cameras> <lights> ... </lights> <materialLibs> ... </materialLibs> </assets> ... </project>
An example with some real values:
<assets> <constants> <constant name="GridSize" value = 512 /> <constant name="CompRO" value = 64 /> <!-- GridSize/8 --> </constants> <attributes> <attribute type="RENDERER" name="temperature" data="FLOAT" value="0" /> <attribute type="RENDERER" name="sunAngles" data="VEC2" x=0 y=10 /> </attributes> <scenes> <scene name="plane" > <file name="../../models/plane.obj"/> </scene> </scenes> <viewports> <viewport name="MainViewport"> <CLEAR_COLOR r="1.0" g="1.0" b="1.0" /> </viewport> </viewports> <cameras> <camera name="MainCamera" > <viewport name="MainViewport" /> <TYPE value="PERSPECTIVE"/> <FOV value=60/> <NEAR value= 0.001/> <FAR value= 1000/> <POSITION x=0 y=1 z=0 /> <VIEW x=0 y=0 z=-1.0 /> </camera> </cameras> <lights> <light name="Sun"> <DIRECTION x=-2 y=-1 z=-2 /> </light> </lights> <materialLibs> <materialLib filename="atmos.mlib" /> </materialLibs> </assets>