98 lines
3.2 KiB
XML
98 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Bump and specular effect
|
|
parameters :
|
|
texture[0] -> colormap
|
|
texture[2] -> normal map + specularity in alpha channel
|
|
|
|
eg :
|
|
in model.xml :
|
|
<effect>
|
|
<inherits-from>Aircraft/A320/Models/Effects/bumpspec</inherits-from>
|
|
<object-name>Fuselage</object-name>
|
|
</effect>
|
|
|
|
in Aircraft/A320/Models/Effects/a320_bumpspec.eff ( or whatever, private to the model )
|
|
|
|
<PropertyList>
|
|
<name>Aircraft/A320/Models/Effects/a320_bumpspec</name>
|
|
<inherits-from>Effects/bumpspec</inherits-from>
|
|
<parameters>
|
|
<texture n="2">
|
|
<image>Aircraft/A320/Models/Effects/textures/a320_normals.png</image>
|
|
<filter>linear-mipmap-linear</filter>
|
|
<wrap-s>repeat</wrap-s>
|
|
<wrap-t>repeat</wrap-t>
|
|
<internal-format>normalized</internal-format>
|
|
</texture>
|
|
</parameters>
|
|
</PropertyList>
|
|
-->
|
|
<PropertyList>
|
|
<inherits-from>Effects/model-default</inherits-from>
|
|
<generate>
|
|
<tangent type="int">6</tangent>
|
|
<binormal type="int">7</binormal>
|
|
</generate>
|
|
<technique n="11"> <!-- This number should be the same than the second technique in model-default -->
|
|
<predicate>
|
|
<and>
|
|
<property>/sim/rendering/shaders/quality-level</property>
|
|
<property>/sim/rendering/shaders/model</property>
|
|
<or>
|
|
<less-equal>
|
|
<value type="float">2.0</value>
|
|
<glversion/>
|
|
</less-equal>
|
|
<and>
|
|
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
</and>
|
|
</or>
|
|
</and>
|
|
</predicate>
|
|
<pass>
|
|
<texture-unit>
|
|
<unit>0</unit>
|
|
<image><use>texture[0]/image</use></image>
|
|
<type><use>texture[0]/type</use></type>
|
|
<filter><use>texture[0]/filter</use></filter>
|
|
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
<internal-format><use>texture[0]/internal-format</use></internal-format>
|
|
</texture-unit>
|
|
<texture-unit>
|
|
<unit>1</unit>
|
|
<image><use>texture[2]/image</use></image>
|
|
<type><use>texture[2]/type</use></type>
|
|
<filter><use>texture[2]/filter</use></filter>
|
|
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
|
|
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
|
|
<internal-format><use>texture[2]/internal-format</use></internal-format>
|
|
</texture-unit>
|
|
<program>
|
|
<vertex-shader n="1">Shaders/bumpspec.vert</vertex-shader>
|
|
<fragment-shader n="1">Shaders/bumpspec.frag</fragment-shader>
|
|
<attribute>
|
|
<name>tangent</name>
|
|
<index>6</index>
|
|
</attribute>
|
|
<attribute>
|
|
<name>binormal</name>
|
|
<index>7</index>
|
|
</attribute>
|
|
</program>
|
|
<uniform>
|
|
<name>tex_color</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">0</value>
|
|
</uniform>
|
|
<uniform>
|
|
<name>tex_normal</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">1</value>
|
|
</uniform>
|
|
</pass>
|
|
</technique>
|
|
</PropertyList>
|