149 lines
5.1 KiB
XML
149 lines
5.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<PropertyList>
|
|
<name>Effects/water</name>
|
|
<inherits-from>Effects/terrain-default</inherits-from>
|
|
<parameters>
|
|
<texture n="0">
|
|
<image>Textures/Water/water-reflection.png</image>
|
|
<filter>linear-mipmap-linear</filter>
|
|
<wrap-s>repeat</wrap-s>
|
|
<wrap-t>repeat</wrap-t>
|
|
<internal-format>normalized</internal-format>
|
|
</texture>
|
|
<texture n="1">
|
|
<image>Textures/Water/water-refraction.png</image>
|
|
<filter>linear-mipmap-linear</filter>
|
|
<wrap-s>repeat</wrap-s>
|
|
<wrap-t>repeat</wrap-t>
|
|
<internal-format>normalized</internal-format>
|
|
</texture>
|
|
<texture n="2">
|
|
<image>Textures/Water/water-normalmap.png</image>
|
|
<filter>linear-mipmap-linear</filter>
|
|
<wrap-s>repeat</wrap-s>
|
|
<wrap-t>repeat</wrap-t>
|
|
<internal-format>normalized</internal-format>
|
|
</texture>
|
|
<texture n="3">
|
|
<image>Textures/Water/water-dudv.png</image>
|
|
<filter>linear-mipmap-linear</filter>
|
|
<wrap-s>repeat</wrap-s>
|
|
<wrap-t>repeat</wrap-t>
|
|
<internal-format>normalized</internal-format>
|
|
</texture>
|
|
<saturation>
|
|
<use>/rendering/scene/saturation</use>
|
|
</saturation>
|
|
</parameters>
|
|
<technique n="8">
|
|
<predicate>
|
|
<and>
|
|
<property>/sim/rendering/water-shader</property>
|
|
<property>/sim/rendering/shader-effects</property>
|
|
<less-equal>
|
|
<value type="float">2.0</value>
|
|
<float-property>/sim/rendering/quality-level</float-property>
|
|
</less-equal>
|
|
<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>
|
|
<ambient><use>material/ambient</use></ambient>
|
|
<diffuse><use>material/diffuse</use></diffuse>
|
|
<specular><use>material/specular</use></specular>
|
|
<color-mode>ambient-and-diffuse</color-mode>
|
|
</material>
|
|
<blend><use>transparent</use></blend>
|
|
<alpha-test><use>transparent</use></alpha-test>
|
|
<shade-model>smooth</shade-model>
|
|
<cull-face>back</cull-face>
|
|
<render-bin>
|
|
<bin-number><use>render-bin/bin-number</use></bin-number>
|
|
<bin-name><use>render-bin/bin-name</use></bin-name>
|
|
</render-bin>
|
|
<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>
|
|
<internal-format>
|
|
<use>texture[0]/internal-format</use>
|
|
</internal-format>
|
|
</texture-unit>
|
|
<texture-unit>
|
|
<unit>1</unit>
|
|
<image><use>texture[1]/image</use></image>
|
|
<filter><use>texture[1]/filter</use></filter>
|
|
<wrap-s><use>texture[1]/wrap-s</use></wrap-s>
|
|
<wrap-t><use>texture[1]/wrap-t</use></wrap-t>
|
|
<internal-format>
|
|
<use>texture[1]/internal-format</use>
|
|
</internal-format>
|
|
</texture-unit>
|
|
<texture-unit>
|
|
<unit>2</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>
|
|
<texture-unit>
|
|
<unit>3</unit>
|
|
<image><use>texture[3]/image</use></image>
|
|
<filter><use>texture[3]/filter</use></filter>
|
|
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
|
|
<wrap-t><use>texture[3]/wrap-t</use></wrap-t>
|
|
<internal-format>
|
|
<use>texture[3]/internal-format</use>
|
|
</internal-format>
|
|
</texture-unit>
|
|
<program>
|
|
<vertex-shader>Shaders/water.vert</vertex-shader>
|
|
<fragment-shader>Shaders/water.frag</fragment-shader>
|
|
</program>
|
|
<uniform>
|
|
<name>water_reflection</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">0</value>
|
|
</uniform>
|
|
<uniform>
|
|
<name>water_refraction</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">1</value>
|
|
</uniform>
|
|
<uniform>
|
|
<name>water_normalmap</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">2</value>
|
|
</uniform>
|
|
<uniform>
|
|
<name>water_dudvmap</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">3</value>
|
|
</uniform>
|
|
<uniform>
|
|
<name>saturation</name>
|
|
<type>float</type>
|
|
<value>0.4</value>
|
|
<!--<value><use>saturation</use></value>-->
|
|
</uniform>
|
|
</pass>
|
|
</technique>
|
|
</PropertyList>
|