2009-11-21 23:35:47 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!-- Effects files for trees, which are placed by a shader. -->
|
|
|
|
|
2009-11-23 21:53:56 +00:00
|
|
|
<!-- Trees are drawn in two passes. The first draws the opaque parts
|
|
|
|
with z writes enabled. The second draws the the transparent bits
|
|
|
|
with z testing enabled and z writes disabled. The transparent
|
|
|
|
tree silhouettes will blend correctly against the opaque
|
|
|
|
geometry. They may cause artifacts when blending against other
|
|
|
|
edges, but the overall "forest" is supposed to be nice and
|
|
|
|
fuzzy. There might also be artifacts when blending over other
|
|
|
|
transparent objects, but that's mostly unavoidable.
|
|
|
|
|
|
|
|
Note: no sorting needed! -->
|
2009-11-21 23:35:47 +00:00
|
|
|
<PropertyList>
|
2011-12-01 21:44:10 +00:00
|
|
|
<name>Effects/tree</name>
|
|
|
|
<parameters>
|
|
|
|
<texture n ="0">
|
|
|
|
</texture>
|
|
|
|
<!-- fog include -->
|
|
|
|
<visibility>
|
|
|
|
<use>/environment/ground-visibility-m</use>
|
|
|
|
</visibility>
|
|
|
|
<avisibility>
|
|
|
|
<use>/environment/visibility-m</use>
|
|
|
|
</avisibility>
|
|
|
|
<lthickness>
|
|
|
|
<use>/environment/ground-haze-thickness-m</use>
|
|
|
|
</lthickness>
|
|
|
|
<scattering>
|
|
|
|
<use>/rendering/scene/scattering</use>
|
|
|
|
</scattering>
|
|
|
|
<terminator>
|
|
|
|
<use>/environment/terminator-relative-position-m</use>
|
|
|
|
</terminator>
|
|
|
|
<fogtype>
|
2011-12-12 16:04:36 +00:00
|
|
|
<use>/sim/rendering/shaders/skydome</use>
|
2011-12-01 21:44:10 +00:00
|
|
|
</fogtype>
|
|
|
|
<!-- END fog include -->
|
|
|
|
</parameters>
|
2012-04-05 06:22:12 +00:00
|
|
|
<technique n="9">
|
2012-04-04 21:39:46 +00:00
|
|
|
<predicate>
|
|
|
|
<and>
|
2012-05-08 15:13:15 +00:00
|
|
|
<property>/sim/rendering/rembrandt/enabled</property>
|
2012-04-04 21:39:46 +00:00
|
|
|
<property>/sim/rendering/random-vegetation</property>
|
|
|
|
</and>
|
|
|
|
</predicate>
|
|
|
|
<pass n="0">
|
|
|
|
<lighting>true</lighting>
|
|
|
|
<material>
|
|
|
|
<ambient type="vec4d">1.0 1.0 1.0 1.0</ambient>
|
|
|
|
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
|
|
|
<color-mode>off</color-mode>
|
|
|
|
</material>
|
|
|
|
<alpha-test>
|
|
|
|
<comparison>gequal</comparison>
|
|
|
|
<reference type="float">0.1</reference>
|
|
|
|
</alpha-test>
|
|
|
|
<texture-unit>
|
|
|
|
<unit>0</unit>
|
|
|
|
<type>2d</type>
|
|
|
|
<image>
|
|
|
|
<use>texture[0]/image</use>
|
|
|
|
</image>
|
|
|
|
<wrap-s>clamp</wrap-s>
|
|
|
|
<wrap-t>clamp</wrap-t>
|
|
|
|
</texture-unit>
|
|
|
|
<program>
|
|
|
|
<vertex-shader>Shaders/deferred-tree.vert</vertex-shader>
|
|
|
|
<fragment-shader>Shaders/deferred-tree.frag</fragment-shader>
|
2012-05-01 06:47:38 +00:00
|
|
|
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
|
2012-05-04 07:34:00 +00:00
|
|
|
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
|
2012-04-04 21:39:46 +00:00
|
|
|
</program>
|
|
|
|
<uniform>
|
|
|
|
<name>texture</name>
|
|
|
|
<type>sampler-2d</type>
|
|
|
|
<value type="int">0</value>
|
|
|
|
</uniform>
|
|
|
|
</pass>
|
|
|
|
</technique>
|
2011-12-01 21:44:10 +00:00
|
|
|
<technique n="10">
|
|
|
|
<predicate>
|
|
|
|
<and>
|
|
|
|
<property>/sim/rendering/random-vegetation</property>
|
|
|
|
<less-equal>
|
|
|
|
<value type="float">1.0</value>
|
|
|
|
<shader-language/>
|
|
|
|
</less-equal>
|
|
|
|
</and>
|
|
|
|
</predicate>
|
|
|
|
<pass n="0">
|
|
|
|
<lighting>true</lighting>
|
|
|
|
<material>
|
|
|
|
<ambient type="vec4d">1.0 1.0 1.0 1.0</ambient>
|
|
|
|
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
|
|
|
<color-mode>off</color-mode>
|
|
|
|
</material>
|
|
|
|
<alpha-test>
|
|
|
|
<comparison>gequal</comparison>
|
|
|
|
<reference type="float">0.33</reference>
|
|
|
|
</alpha-test>
|
|
|
|
<texture-unit>
|
|
|
|
<unit>0</unit>
|
|
|
|
<type>2d</type>
|
|
|
|
<image>
|
|
|
|
<use>texture[0]/image</use>
|
|
|
|
</image>
|
|
|
|
<wrap-s>clamp</wrap-s>
|
|
|
|
<wrap-t>clamp</wrap-t>
|
|
|
|
</texture-unit>
|
|
|
|
<program>
|
|
|
|
<!-- <vertex-shader>Shaders/include_fog.vert</vertex-shader> -->
|
|
|
|
<vertex-shader>Shaders/tree.vert</vertex-shader>
|
|
|
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
|
|
<fragment-shader n="1">Shaders/tree.frag</fragment-shader>
|
|
|
|
</program>
|
|
|
|
<uniform>
|
|
|
|
<name>baseTexture</name>
|
|
|
|
<type>sampler-2d</type>
|
|
|
|
<value type="int">0</value>
|
|
|
|
</uniform>
|
|
|
|
<!-- BEGIN fog include -->
|
|
|
|
<uniform>
|
|
|
|
<name>visibility</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>visibility</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>avisibility</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>avisibility</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>hazeLayerAltitude</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>lthickness</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>scattering</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>scattering</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>terminator</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>terminator</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>fogType</name>
|
|
|
|
<type>int</type>
|
|
|
|
<value>
|
|
|
|
<use>fogtype</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<!-- END fog include -->
|
|
|
|
</pass>
|
2012-05-02 20:55:57 +00:00
|
|
|
|
2012-04-04 21:39:46 +00:00
|
|
|
<pass n="1">
|
2011-12-01 21:44:10 +00:00
|
|
|
<lighting>true</lighting>
|
|
|
|
<material>
|
|
|
|
<ambient type="vec4d">1.0 1.0 1.0 1.0</ambient>
|
|
|
|
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
|
|
|
<color-mode>off</color-mode>
|
|
|
|
</material>
|
|
|
|
<render-bin>
|
|
|
|
<bin-number>2</bin-number>
|
|
|
|
<bin-name>RenderBin</bin-name>
|
|
|
|
</render-bin>
|
|
|
|
<alpha-test>
|
|
|
|
<comparison>less</comparison>
|
|
|
|
<reference type="float">0.33</reference>
|
|
|
|
</alpha-test>
|
|
|
|
<blend>
|
|
|
|
<source>src-alpha</source>
|
|
|
|
<destination>one-minus-src-alpha</destination>
|
|
|
|
</blend>
|
|
|
|
<depth>
|
|
|
|
<write-mask>false</write-mask>
|
|
|
|
</depth>
|
|
|
|
<texture-unit>
|
|
|
|
<unit>0</unit>
|
|
|
|
<type>2d</type>
|
|
|
|
<image>
|
|
|
|
<use>texture[0]/image</use>
|
|
|
|
</image>
|
|
|
|
<wrap-s>clamp</wrap-s>
|
|
|
|
<wrap-t>clamp</wrap-t>
|
|
|
|
</texture-unit>
|
|
|
|
<program>
|
2012-05-02 20:55:57 +00:00
|
|
|
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
2011-12-01 21:44:10 +00:00
|
|
|
<vertex-shader n="1">Shaders/tree.vert</vertex-shader>
|
|
|
|
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
|
|
<fragment-shader n="1">Shaders/tree.frag</fragment-shader>
|
|
|
|
</program>
|
|
|
|
<uniform>
|
|
|
|
<name>baseTexture</name>
|
|
|
|
<type>sampler-2d</type>
|
|
|
|
<value type="int">0</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>visibility</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>visibility</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>avisibility</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>avisibility</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>hazeLayerAltitude</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>lthickness</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>scattering</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>scattering</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>terminator</name>
|
|
|
|
<type>float</type>
|
|
|
|
<value>
|
|
|
|
<use>terminator</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
<uniform>
|
|
|
|
<name>fogType</name>
|
|
|
|
<type>int</type>
|
|
|
|
<value>
|
|
|
|
<use>fogtype</use>
|
|
|
|
</value>
|
|
|
|
</uniform>
|
|
|
|
</pass>
|
|
|
|
</technique>
|
2009-11-21 23:35:47 +00:00
|
|
|
</PropertyList>
|