1
0
Fork 0

cleanup water shader properties, interpolate sea-surface wind

This commit is contained in:
Torsten Dreyer 2012-01-20 12:47:11 +01:00
parent fc09782f93
commit 22aeda4a04
4 changed files with 31 additions and 23 deletions

View file

@ -9,10 +9,12 @@
<!-- DIFFUSE -->
</material>
<shade-model>smooth</shade-model>
<!-- unused ?
<wind-speed>
<!- -<use>/environment/Vinson/rel-wind-speed-kts</use>- ->
<use>/environment/config/boundary/entry[0]/wind-speed-kt</use>
</wind-speed>
-->
<offset>0.0</offset>
<amplitude-factor>0.08</amplitude-factor>
<windE>
@ -161,13 +163,13 @@
<use>material/color-mode-uniform</use>
</value>
</uniform>
<uniform>
<!-- uniform> unused?
<name>WindSpeed</name>
<type>float</type>
<value>
<use>wind-speed</use>
</value>
</uniform>
</uniform-->
<uniform>
<name>Offset</name>
<type>float</type>

View file

@ -86,9 +86,9 @@
<windN>
<use>/environment/sea/surface/wind-from-north-fps</use>
</windN>
<wind-from>
<!--wind-from> unused?
<use>/environment/config/boundary/entry[0]/wind-from-heading-deg</use>
</wind-from>
</wind-from-->
<WaveFreq>
<use>/environment/wave/freq</use>
</WaveFreq>
@ -398,13 +398,13 @@
<use>windN</use>
</value>
</uniform>
<uniform>
<!-- uniform> unused?
<name>WindFrom</name>
<type>float</type>
<value>
<use>wind-from</use>
</value>
</uniform>
</uniform-->
<uniform>
<name>WaveFreq</name>
<type>float</type>
@ -765,13 +765,13 @@
<use>windN</use>
</value>
</uniform>
<uniform>
<!--uniform> unused?
<name>WindFrom</name>
<type>float</type>
<value>
<use>wind-from</use>
</value>
</uniform>
</uniform-->
<uniform>
<name>WaveFreq</name>
<type>float</type>

View file

@ -328,4 +328,10 @@
</area>
</terrain>
<sea>
<config>
<wind-filter-time type="double">60.0</wind-filter-time>
</config>
</sea>
</PropertyList>

View file

@ -205,33 +205,33 @@
<name>EnvironmentInterpolator:wave:wind-from-east-fps</name>
<input>/environment/config/boundary/entry[0]/wind-from-east-fps</input>
<output>/environment/sea/surface/wind-from-east-fps</output>
<type>gain</type>
<gain>1</gain>
<type>exponential</type>
<filter-time>/environment/sea/config/wind-filter-time</filter-time>
</filter>
<filter>
<name>EnvironmentInterpolator:wave:wind-from-north-fps</name>
<input>/environment/config/boundary/entry[0]/wind-from-north-fps</input>
<output>/environment/sea/surface/wind-from-north-fps</output>
<type>gain</type>
<gain>1</gain>
<type>exponential</type>
<filter-time>/environment/sea/config/wind-filter-time</filter-time>
</filter>
<filter>
<!--filter> unused?
<name>EnvironmentInterpolator:wave:wind-from-heading-deg</name>
<input>/environment/config/boundary/entry[0]/wind-from-heading-deg</input>
<output>/environment/sea/surface/wind-from-deg</output>
<type>gain</type>
<gain>1</gain>
</filter>
</filter-->
<filter>
<!--filter> unused?
<name>EnvironmentInterpolator:wave:wind-speed-kt</name>
<input>/environment/config/boundary/entry[0]/wind-speed-kt</input>
<output>/environment/sea/surface/wind-speed-kt</output>
<type>gain</type>
<gain>1</gain>
</filter>
</filter-->
<logic>
<name>EnvironmentInterpolator:wave:enabled</name>
@ -273,7 +273,7 @@
<value>1.0</value>
<product>
<value>0.02</value>
<property>/environment/sea/surface/wind-speed-kt</property>
<property>/environment/config/boundary/entry[0]/wind-speed-kt</property>
</product>
</sum>
</expression>
@ -293,7 +293,7 @@
<value>35.0</value>
<product>
<value>0.2</value>
<property>/environment/sea/surface/wind-speed-kt</property>
<property>/environment/config/boundary/entry[0]/wind-speed-kt</property>
</product>
</sum>
</expression>
@ -311,7 +311,7 @@
<value>20.0</value>
<product>
<value>0.4</value>
<property>/environment/sea/surface/wind-speed-kt</property>
<property>/environment/config/boundary/entry[0]/wind-speed-kt</property>
</product>
</difference>
</expression>
@ -329,7 +329,7 @@
<value>0.01</value>
<product>
<value>0.0008</value>
<property>/environment/sea/surface/wind-speed-kt</property>
<property>/environment/config/boundary/entry[0]/wind-speed-kt</property>
</product>
</sum>
</expression>
@ -349,7 +349,7 @@
<value>0.0004</value>
<product>
<value>0.00001</value>
<property>/environment/sea/surface/wind-speed-kt</property>
<property>/environment/config/boundary/entry[0]/wind-speed-kt</property>
</product>
</difference>
</expression>
@ -369,7 +369,7 @@
<value>1.0</value>
<product>
<value>0.02</value>
<property>/environment/sea/surface/wind-speed-kt</property>
<property>/environment/config/boundary/entry[0]/wind-speed-kt</property>
</product>
</sum>
</expression>