0ad/binaries/data/mods/mod/shaders/program.rng
leper be2f0e69fc Make the modmod standalone.
Mount public in case we are starting Atlas and no mods are specified in
the config.
If users remove all mods and save this to the config and try to start
Atlas it will
crash, as it cannot find some needed files.

This was SVN commit r15678.
2014-08-25 16:38:54 +00:00

134 lines
5.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<element name="program">
<zeroOrMore>
<element name="define">
<attribute name="name"><text/></attribute>
<attribute name="value"><text/></attribute>
</element>
</zeroOrMore>
<choice>
<group>
<attribute name="type">
<value>arb</value>
</attribute>
<element name="vertex">
<attribute name="file"><text/></attribute>
<zeroOrMore>
<choice>
<ref name="uniformContent"/>
<element name="attrib">
<ref name="conditional"/>
<attribute name="name"><text/></attribute>
<attribute name="loc"><data type="integer"/></attribute>
</element>
<ref name="streamContent"/>
</choice>
</zeroOrMore>
</element>
<element name="fragment">
<attribute name="file"><text/></attribute>
<zeroOrMore>
<ref name="uniformContent"/>
</zeroOrMore>
</element>
</group>
<group>
<attribute name="type">
<value>glsl</value>
</attribute>
<element name="vertex">
<attribute name="file"><text/></attribute>
<zeroOrMore>
<choice>
<element name="attrib">
<ref name="conditional"/>
<attribute name="name"><text/></attribute>
<attribute name="semantics">
<choice>
<value>gl_Vertex</value>
<value>gl_Normal</value>
<value>gl_Color</value>
<value>gl_SecondaryColor</value>
<value>gl_FogCoord</value>
<value>gl_MultiTexCoord0</value>
<value>gl_MultiTexCoord1</value>
<value>gl_MultiTexCoord2</value>
<value>gl_MultiTexCoord3</value>
<value>gl_MultiTexCoord4</value>
<value>gl_MultiTexCoord5</value>
<value>gl_MultiTexCoord6</value>
<value>gl_MultiTexCoord7</value>
<value>CustomAttribute0</value>
<value>CustomAttribute1</value>
<value>CustomAttribute2</value>
</choice>
</attribute>
</element>
<ref name="streamContent"/>
</choice>
</zeroOrMore>
</element>
<element name="fragment">
<attribute name="file"><text/></attribute>
</element>
</group>
</choice>
</element>
</start>
<define name="uniformContent">
<element name="uniform">
<ref name="conditional"/>
<attribute name="name"><text/></attribute>
<attribute name="loc"><data type="integer"/></attribute>
<attribute name="type">
<choice>
<value>float</value>
<value>vec2</value>
<value>vec3</value>
<value>vec4</value>
<value>mat2</value>
<value>mat3</value>
<value>mat4</value>
<value>sampler2D</value>
<value>sampler2DShadow</value>
<value>samplerCube</value>
</choice>
</attribute>
</element>
</define>
<define name="streamContent">
<element name="stream">
<ref name="conditional"/>
<attribute name="name">
<choice>
<value>pos</value>
<value>normal</value>
<value>color</value>
<value>uv0</value>
<value>uv1</value>
<value>uv2</value>
<value>uv3</value>
</choice>
</attribute>
</element>
</define>
<define name="conditional">
<optional>
<attribute name="if"><text/></attribute>
</optional>
</define>
</grammar>