2009-11-14 06:18:44 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<PropertyList>
|
|
|
|
<name>Effects/model-default</name>
|
2009-11-17 06:23:12 +00:00
|
|
|
<parameters>
|
|
|
|
<texture n ="0">
|
|
|
|
<type>white</type>
|
|
|
|
</texture>
|
2010-06-15 17:29:24 +00:00
|
|
|
<vertex-program-two-side type="bool">false</vertex-program-two-side>
|
2009-11-17 06:23:12 +00:00
|
|
|
</parameters>
|
2009-11-14 06:18:44 +00:00
|
|
|
<technique n="10">
|
|
|
|
<predicate>
|
|
|
|
<and>
|
|
|
|
<property>/sim/rendering/shader-effects</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>
|
|
|
|
<lighting>true</lighting>
|
|
|
|
<material>
|
|
|
|
<active><use>material/active</use></active>
|
|
|
|
<ambient><use>material/ambient</use></ambient>
|
|
|
|
<diffuse><use>material/diffuse</use></diffuse>
|
|
|
|
<specular><use>material/specular</use></specular>
|
2009-11-16 07:24:32 +00:00
|
|
|
<emissive><use>material/emissive</use></emissive>
|
|
|
|
<shininess><use>material/shininess</use></shininess>
|
2009-11-14 06:18:44 +00:00
|
|
|
<color-mode><use>material/color-mode</use></color-mode>
|
|
|
|
</material>
|
|
|
|
<blend>
|
|
|
|
<active><use>blend/active</use></active>
|
|
|
|
<source><use>blend/source</use></source>
|
|
|
|
<destination><use>blend/destination</use></destination>
|
|
|
|
</blend>
|
|
|
|
<shade-model><use>shade-model</use></shade-model>
|
|
|
|
<cull-face><use>cull-face</use></cull-face>
|
|
|
|
<rendering-hint><use>rendering-hint</use></rendering-hint>
|
|
|
|
<texture-unit>
|
2009-11-17 06:23:12 +00:00
|
|
|
<!-- The texture unit is always active because the shaders expect
|
|
|
|
that. -->
|
2009-11-14 06:18:44 +00:00
|
|
|
<unit>0</unit>
|
2009-11-17 06:23:12 +00:00
|
|
|
<!-- If there is a texture, the type in the derived effect
|
|
|
|
will be "2d". -->
|
2009-11-14 06:18:44 +00:00
|
|
|
<type><use>texture[0]/type</use></type>
|
|
|
|
<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>
|
|
|
|
<!--
|
|
|
|
<internal-format>
|
|
|
|
<use>texture[0]/internal-format</use>
|
|
|
|
</internal-format>
|
|
|
|
-->
|
|
|
|
</texture-unit>
|
2010-06-15 17:29:24 +00:00
|
|
|
<vertex-program-two-side>
|
|
|
|
<use>vertex-program-two-side</use>
|
|
|
|
</vertex-program-two-side>
|
2009-11-14 06:18:44 +00:00
|
|
|
<program>
|
2009-11-14 06:19:09 +00:00
|
|
|
<vertex-shader>Shaders/model-default.vert</vertex-shader>
|
2010-06-15 17:29:24 +00:00
|
|
|
<fragment-shader>Shaders/model-default.frag</fragment-shader>
|
2009-11-14 06:18:44 +00:00
|
|
|
</program>
|
|
|
|
<uniform>
|
2010-06-15 17:29:24 +00:00
|
|
|
<name>texture</name>
|
|
|
|
<type>sampler-2d</type>
|
|
|
|
<value type="int">0</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>twoSideHack</name>
|
|
|
|
<type>bool</type>
|
|
|
|
<value><use>vertex-program-two-side</use></value>
|
|
|
|
</uniform>
|
2009-11-14 06:18:44 +00:00
|
|
|
</pass>
|
|
|
|
</technique>
|
|
|
|
<technique n="11">
|
|
|
|
<pass>
|
|
|
|
<lighting>true</lighting>
|
|
|
|
<material>
|
|
|
|
<active><use>material/active</use></active>
|
|
|
|
<ambient><use>material/ambient</use></ambient>
|
|
|
|
<diffuse><use>material/diffuse</use></diffuse>
|
|
|
|
<specular><use>material/specular</use></specular>
|
2009-11-16 07:24:32 +00:00
|
|
|
<emissive><use>material/emissive</use></emissive>
|
|
|
|
<shininess><use>material/shininess</use></shininess>
|
2009-11-14 06:18:44 +00:00
|
|
|
<color-mode><use>material/color-mode</use></color-mode>
|
|
|
|
</material>
|
|
|
|
<blend>
|
|
|
|
<active><use>blend/active</use></active>
|
|
|
|
<source><use>blend/source</use></source>
|
|
|
|
<destination><use>blend/destination</use></destination>
|
|
|
|
</blend>
|
|
|
|
<shade-model><use>shade-model</use></shade-model>
|
|
|
|
<cull-face><use>cull-face</use></cull-face>
|
|
|
|
<rendering-hint><use>rendering-hint</use></rendering-hint>
|
|
|
|
<texture-unit>
|
|
|
|
<active><use>texture[0]/active</use></active>
|
|
|
|
<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>
|
|
|
|
<!--
|
|
|
|
<internal-format>
|
|
|
|
<use>texture[0]/internal-format</use>
|
|
|
|
</internal-format>
|
|
|
|
-->
|
|
|
|
<environment>
|
|
|
|
<mode>modulate</mode>
|
|
|
|
</environment>
|
|
|
|
</texture-unit>
|
2010-06-15 17:29:24 +00:00
|
|
|
<!-- A two-sided lighting model is set by default near the root
|
|
|
|
of the scene graph. Perhaps that ought to be set in this
|
|
|
|
effect?
|
|
|
|
-->
|
2009-11-14 06:18:44 +00:00
|
|
|
</pass>
|
|
|
|
</technique>
|
|
|
|
</PropertyList>
|