2010-03-16 07:21:47 +00:00
|
|
|
<?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>
|
|
|
|
<name>Effects/bumpspec</name>
|
|
|
|
<inherits-from>Effects/model-default</inherits-from>
|
|
|
|
<generate>
|
|
|
|
<tangent type="int">6</tangent>
|
|
|
|
<binormal type="int">7</binormal>
|
|
|
|
</generate>
|
2012-03-25 17:03:52 +00:00
|
|
|
<technique n="11"> <!-- This number should be the same than the second technique in model-default -->
|
2010-03-16 07:21:47 +00:00
|
|
|
<predicate>
|
|
|
|
<and>
|
2012-11-17 22:33:42 +00:00
|
|
|
<property>/sim/rendering/shaders/quality-level</property>
|
2011-12-12 16:04:36 +00:00
|
|
|
<property>/sim/rendering/shaders/model</property>
|
2010-03-16 07:21:47 +00:00
|
|
|
<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>
|
|
|
|
<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>
|
2011-12-01 21:47:42 +00:00
|
|
|
<internal-format><use>texture[0]/internal-format</use></internal-format>
|
2010-03-16 07:21:47 +00:00
|
|
|
</texture-unit>
|
|
|
|
<texture-unit>
|
|
|
|
<unit>1</unit>
|
|
|
|
<image><use>texture[2]/image</use></image>
|
|
|
|
<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>
|
2011-12-01 21:47:42 +00:00
|
|
|
<vertex-shader n="1">Shaders/bumpspec.vert</vertex-shader>
|
|
|
|
<fragment-shader n="1">Shaders/bumpspec.frag</fragment-shader>
|
2010-03-17 17:56:13 +00:00
|
|
|
<attribute>
|
|
|
|
<name>tangent</name>
|
|
|
|
<index>6</index>
|
|
|
|
</attribute>
|
|
|
|
<attribute>
|
|
|
|
<name>binormal</name>
|
|
|
|
<index>7</index>
|
|
|
|
</attribute>
|
2010-03-16 07:21:47 +00:00
|
|
|
</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>
|