Compositor: Ported most Effects to the compositor
This commit is contained in:
parent
8efa938ace
commit
fb7f1545a0
223 changed files with 68801 additions and 125 deletions
|
@ -1,15 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PropertyList>
|
||||
<name>test</name>
|
||||
|
||||
<buffer>
|
||||
<name>refl</name>
|
||||
<type>cubemap</type>
|
||||
<width>128</width>
|
||||
<height>128</height>
|
||||
<format>rgba8</format>
|
||||
</buffer>
|
||||
<name>ALS</name>
|
||||
|
||||
<buffer>
|
||||
<name>color</name>
|
||||
|
@ -18,7 +10,6 @@
|
|||
<height>screen</height>
|
||||
<format>rgba8</format>
|
||||
</buffer>
|
||||
|
||||
<buffer>
|
||||
<name>depth</name>
|
||||
<type>2d</type>
|
||||
|
@ -26,122 +17,130 @@
|
|||
<height>screen</height>
|
||||
<format>depth32f</format>
|
||||
</buffer>
|
||||
|
||||
<buffer>
|
||||
<name>shadow-atlas</name>
|
||||
<name>sun-shadowmap-atlas</name>
|
||||
<type>2d</type>
|
||||
<width>8192</width>
|
||||
<height>8192</height>
|
||||
<width><property>/sim/rendering/als/shadows/sun-atlas-size</property></width>
|
||||
<height><property>/sim/rendering/als/shadows/sun-atlas-size</property></height>
|
||||
<format>depth32f</format>
|
||||
<wrap-s>clamp-to-border</wrap-s>
|
||||
<wrap-t>clamp-to-border</wrap-t>
|
||||
<wrap-r>clamp-to-border</wrap-r>
|
||||
<min-filter>linear</min-filter>
|
||||
<mag-filter>linear</mag-filter>
|
||||
<border-color type="vec4d">1.0 1.0 1.0 1.0</border-color>
|
||||
<shadow-comparison>true</shadow-comparison>
|
||||
</buffer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Shadow mapping pre-passes -->
|
||||
<pass include="csm.xml">
|
||||
<name>csm0</name>
|
||||
<near-m>0.1</near-m>
|
||||
<far-m>3.0</far-m>
|
||||
</pass>
|
||||
|
||||
<!-- Shadow cascades -->
|
||||
<!--
|
||||
<pass include="csm.xml">
|
||||
<name>csm0</name>
|
||||
<near-m>0.1</near-m>
|
||||
<far-m>5.0</far-m>
|
||||
<viewport>
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
<width>0.25</width>
|
||||
<height>1.0</height>
|
||||
<width>0.5</width>
|
||||
<height>0.5</height>
|
||||
</viewport>
|
||||
</pass>
|
||||
<pass include="csm.xml">
|
||||
<name>csm1</name>
|
||||
<near-m>5.0</near-m>
|
||||
<far-m>50.0</far-m>
|
||||
<near-m>3.0</near-m>
|
||||
<far-m>30.0</far-m>
|
||||
<viewport>
|
||||
<x>0.25</x>
|
||||
<x>0.5</x>
|
||||
<y>0.0</y>
|
||||
<width>0.25</width>
|
||||
<height>1.0</height>
|
||||
<width>0.5</width>
|
||||
<height>0.5</height>
|
||||
</viewport>
|
||||
</pass>
|
||||
<pass include="csm.xml">
|
||||
<name>csm2</name>
|
||||
<near-m>50.0</near-m>
|
||||
<far-m>500.0</far-m>
|
||||
<near-m>30.0</near-m>
|
||||
<far-m>300.0</far-m>
|
||||
<viewport>
|
||||
<x>0.5</x>
|
||||
<y>0.0</y>
|
||||
<width>0.25</width>
|
||||
<height>1.0</height>
|
||||
<x>0.0</x>
|
||||
<y>0.5</y>
|
||||
<width>0.5</width>
|
||||
<height>0.5</height>
|
||||
</viewport>
|
||||
</pass>
|
||||
<pass include="csm.xml">
|
||||
<name>csm3</name>
|
||||
<near-m>500.0</near-m>
|
||||
<far-m>5000.0</far-m>
|
||||
<near-m>300.0</near-m>
|
||||
<far-m>3000.0</far-m>
|
||||
<viewport>
|
||||
<x>0.75</x>
|
||||
<y>0.0</y>
|
||||
<width>0.25</width>
|
||||
<height>1.0</height>
|
||||
<x>0.5</x>
|
||||
<y>0.5</y>
|
||||
<width>0.5</width>
|
||||
<height>0.5</height>
|
||||
</viewport>
|
||||
</pass>
|
||||
-->
|
||||
|
||||
|
||||
<pass>
|
||||
<name>forward</name>
|
||||
<type>scene</type>
|
||||
|
||||
<effect-scheme>als-lighting</effect-scheme>
|
||||
<!--
|
||||
<clustered-shading>
|
||||
<tile-size>128</tile-size>
|
||||
<num-threads>4</num-threads>
|
||||
<depth-slices>16</depth-slices>
|
||||
</clustered-shading>
|
||||
-->
|
||||
<use-shadow-pass>csm0</use-shadow-pass>
|
||||
|
||||
<use-shadow-pass>csm1</use-shadow-pass>
|
||||
<use-shadow-pass>csm2</use-shadow-pass>
|
||||
<use-shadow-pass>csm3</use-shadow-pass>
|
||||
|
||||
<binding>
|
||||
<buffer>shadow-atlas</buffer>
|
||||
<buffer>sun-shadowmap-atlas</buffer>
|
||||
<unit>10</unit>
|
||||
</binding>
|
||||
|
||||
<attachment>
|
||||
<buffer>color</buffer>
|
||||
<component>color0</component>
|
||||
<!--
|
||||
<multisample-samples>4</multisample-samples>
|
||||
<multisample-color-samples>4</multisample-color-samples>
|
||||
-->
|
||||
</attachment>
|
||||
<attachment>
|
||||
<buffer>depth</buffer>
|
||||
<component>depth</component>
|
||||
</attachment>
|
||||
<buffer>depth</buffer>
|
||||
<component>depth</component>
|
||||
</attachment>
|
||||
</pass>
|
||||
|
||||
<pass>
|
||||
<name>display</name>
|
||||
<type>quad</type>
|
||||
<clear-color-bit>false</clear-color-bit>
|
||||
<binding>
|
||||
<buffer>color</buffer>
|
||||
<unit>0</unit>
|
||||
</binding>
|
||||
</pass>
|
||||
<!--
|
||||
|
||||
|
||||
<pass>
|
||||
<name>shadow-debug</name>
|
||||
<name>depth-debug</name>
|
||||
<type>quad</type>
|
||||
<clear-color-bit>false</clear-color-bit>
|
||||
<clear-mask>depth</clear-mask>
|
||||
<geometry>
|
||||
<left>0.7</left>
|
||||
<left>0.8</left>
|
||||
<bottom>0.0</bottom>
|
||||
<width>0.3</width>
|
||||
<width>0.2</width>
|
||||
<height>0.2</height>
|
||||
<scale>1.0</scale>
|
||||
</geometry>
|
||||
<binding>
|
||||
<buffer>shadow-atlas</buffer>
|
||||
<buffer>depth</buffer>
|
||||
<unit>0</unit>
|
||||
</binding>
|
||||
</pass>
|
||||
-->
|
||||
|
||||
</PropertyList>
|
|
@ -3,16 +3,14 @@
|
|||
<PropertyList>
|
||||
<type>shadow-map</type>
|
||||
<light-name>FGLightSource</light-name>
|
||||
<effect-override>Effects/shadow-pass</effect-override>
|
||||
<effect-scheme>als-shadow</effect-scheme>
|
||||
<!-- Only render objects with the CAST_SHADOW bit flag -->
|
||||
<cull-mask>0x000004</cull-mask>
|
||||
<!--
|
||||
<condition>
|
||||
<property>/sim/rendering/shadows/enabled</property>
|
||||
<property>/sim/rendering/als/shadows/enabled</property>
|
||||
</condition>
|
||||
-->
|
||||
<attachment>
|
||||
<buffer>shadow-atlas</buffer>
|
||||
<buffer>sun-shadowmap-atlas</buffer>
|
||||
<component>depth</component>
|
||||
</attachment>
|
||||
</PropertyList>
|
18
Compositor/Effects/ALS/shadow-pass.eff
Normal file
18
Compositor/Effects/ALS/shadow-pass.eff
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PropertyList>
|
||||
<name>Effects/ALS/shadow-pass</name>
|
||||
<technique>
|
||||
<scheme>als-shadow</scheme>
|
||||
<pass>
|
||||
<lighting>false</lighting>
|
||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
||||
<cull-face>back</cull-face>
|
||||
<!--
|
||||
<program>
|
||||
<vertex-shader>Compositor/Shaders/shadow-pass.vert</vertex-shader>
|
||||
<fragment-shader>Compositor/Shaders/shadow-pass.frag</fragment-shader>
|
||||
</program>
|
||||
-->
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
1155
Compositor/Effects/agriculture.eff
Normal file
1155
Compositor/Effects/agriculture.eff
Normal file
File diff suppressed because it is too large
Load diff
868
Compositor/Effects/airfield.eff
Normal file
868
Compositor/Effects/airfield.eff
Normal file
|
@ -0,0 +1,868 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/airfield</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="13">
|
||||
<image>Textures/Terrain/airport_grass2.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="14">
|
||||
<image>Textures/Terrain/void.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="15">
|
||||
<image>Textures/Terrain/void.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<base_layer_magnification>5.0</base_layer_magnification>
|
||||
<overlay_layer_magnification>4.0</overlay_layer_magnification>
|
||||
<grain_layer_magnification>4.0</grain_layer_magnification>
|
||||
<use_overlay>0</use_overlay>
|
||||
<use_grain>0</use_grain>
|
||||
<use_color_overlay>1</use_color_overlay>
|
||||
<grit_alpha>1.0</grit_alpha>
|
||||
<overlay_bias>0.0</overlay_bias>
|
||||
<overlay_alpha>1.0</overlay_alpha>
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<float-property>/sim/rendering/shaders/transition</float-property>
|
||||
</less-equal>
|
||||
</or>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<use>transparent</use>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<cull-face>back</cull-face>
|
||||
<render-bin>
|
||||
<bin-number>-1</bin-number>
|
||||
<bin-name>RenderBin</bin-name>
|
||||
</render-bin>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/trivial.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/trivial.frag</fragment-shader>
|
||||
</program>
|
||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
||||
</pass>
|
||||
<pass>
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient>
|
||||
<use>material/ambient</use>
|
||||
</ambient>
|
||||
<diffuse>
|
||||
<use>material/diffuse</use>
|
||||
</diffuse>
|
||||
<specular>
|
||||
<use>material/specular</use>
|
||||
</specular>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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[13]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[13]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[13]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[13]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[13]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[13]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[14]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[14]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[14]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[14]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[14]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[14]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>2</unit>
|
||||
<image>
|
||||
<use>texture[15]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[15]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[15]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[15]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[15]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[15]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/terrain-ultra.vert</vertex-shader>
|
||||
<vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/airfield.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/cloud-shadowfunc.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snow_thickness_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_thickness_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dust_cover_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dust_cover_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>wetness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>wetness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fogstructure</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fogstructure</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grit_alpha</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>grit_alpha</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_bias</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay_bias</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_alpha</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay_alpha</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>base_layer_magnification</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>base_layer_magnification</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_layer_magnification</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay_layer_magnification</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_layer_magnification</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>grain_layer_magnification</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>season</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- secondary lights -->
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- cloud shadows -->
|
||||
<uniform>
|
||||
<name>cloudpos1_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos1_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_shadow_flag</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>cloud_shadow_flag</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>quality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tquality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>tquality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_overlay</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_overlay</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_grain</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_grain</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_color_overlay</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_color_overlay</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>raise_vertex</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>raise_vertex</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>2</value>
|
||||
<!-- AMBIENT_AND_DIFFUSE -->
|
||||
</uniform>
|
||||
<depth>
|
||||
<function>lequal</function>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
235
Compositor/Effects/birdswarm.eff
Normal file
235
Compositor/Effects/birdswarm.eff
Normal file
|
@ -0,0 +1,235 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/birdswarm</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<image>Models/Effects/Birds/birds_in_flight.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<color_base_r type="float">0.9</color_base_r>
|
||||
<color_base_g type="float">0.8</color_base_g>
|
||||
<color_base_b type="float">0.82</color_base_b>
|
||||
<color_alt_r type="float">0.7</color_alt_r>
|
||||
<color_alt_g type="float">0.3</color_alt_g>
|
||||
<color_alt_b type="float">0.25</color_alt_b>
|
||||
<visibility>
|
||||
<use>/environment/ground-visibility-m</use>
|
||||
</visibility>
|
||||
<avisibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</avisibility>
|
||||
<lthickness>
|
||||
<use>/environment/ground-haze-thickness-m</use>
|
||||
</lthickness>
|
||||
<terrain_alt>
|
||||
<use>/environment/mean-terrain-elevation-m</use>
|
||||
</terrain_alt>
|
||||
<eye_alt>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</eye_alt>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<scattering>
|
||||
<use>/rendering/scene/scattering</use>
|
||||
</scattering>
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<image>
|
||||
<use>texture[0]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<vertex-program-two-side>false</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/birds.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/birds.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>color_base_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>color_base_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>color_base_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>color_base_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>color_base_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>color_base_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>color_alt_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>color_alt_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>color_alt_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>color_alt_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>color_alt_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>color_alt_b</use>
|
||||
</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>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
1094
Compositor/Effects/bowwave.eff
Normal file
1094
Compositor/Effects/bowwave.eff
Normal file
File diff suppressed because it is too large
Load diff
916
Compositor/Effects/building.eff
Normal file
916
Compositor/Effects/building.eff
Normal file
|
@ -0,0 +1,916 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/building</name>
|
||||
<inherits-from>Effects/model-combined-deferred</inherits-from>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>2d</type>
|
||||
<image>Textures/buildings.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<!-- Normal Map -->
|
||||
<normalmap-enabled type="int"> 1 </normalmap-enabled>
|
||||
<normalmap-dds type="int"> 0 </normalmap-dds>
|
||||
<normalmap-tiling type="float"> 1.0 </normalmap-tiling>
|
||||
<texture n="2">
|
||||
<image>Textures/buildings-normalmap_orig.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<!-- Light Map -->
|
||||
<texture n="3">
|
||||
<image>Textures/buildings-lightmap.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<lightmap-enabled type="int"> 1 </lightmap-enabled>
|
||||
<lightmap-multi type="int"> 0 </lightmap-multi>
|
||||
<lightmap-factor type="float" n="0">
|
||||
<use>/sim/time/sun-angle-rad</use>
|
||||
</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0"> 0.3 0.3 0.3 </lightmap-color>
|
||||
<!--<lightmap-factor type="float" n="1">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="1"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="2">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="3">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>-->
|
||||
<!-- Reflection -->
|
||||
<reflection-enabled type="int"> 1 </reflection-enabled>
|
||||
<reflect-map-enabled type="int"> 1 </reflect-map-enabled>
|
||||
<reflection-correction type="float"> -0.15 </reflection-correction>
|
||||
<reflection-dynamic type="int"> 0 </reflection-dynamic>
|
||||
<reflection-fresnel type="float"> 0.0 </reflection-fresnel>
|
||||
<reflection-rainbow type="float"> 0.0 </reflection-rainbow>
|
||||
<reflection-noise type="float"> 0.0 </reflection-noise>
|
||||
<texture n="5">
|
||||
<type>cubemap</type>
|
||||
<images>
|
||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/buildings/N.png</positive-x>
|
||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/buildings/S.png</negative-x>
|
||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/buildings/W.png</positive-y>
|
||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/buildings/E.png</negative-y>
|
||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/buildings/U.png</positive-z>
|
||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/buildings/D.png</negative-z>
|
||||
</images>
|
||||
</texture>
|
||||
<texture n="6">
|
||||
<!-- instance information from shader -->
|
||||
<type>2d</type>
|
||||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
</texture>
|
||||
<!--Ambient correction -->
|
||||
<ambient-correction type="float"> 0.0 </ambient-correction>
|
||||
<dirt-enabled type="int"> 0 </dirt-enabled>
|
||||
<dirt-color type="vec3d"> 0.0 0.0 0.0 </dirt-color>
|
||||
<dirt-factor type="float"> 0.0 </dirt-factor>
|
||||
<material>
|
||||
<active>true</active>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
|
||||
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
||||
<specular type="vec4d">0.0 0.0 0.0 1.0</specular>
|
||||
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
|
||||
<shininess>0.1</shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
</material>
|
||||
<material-id>0</material-id>
|
||||
<blend>
|
||||
<active>0</active>
|
||||
<source>0</source>
|
||||
<destination>0</destination>
|
||||
</blend>
|
||||
<shade-model>flat</shade-model>
|
||||
<cull-face>back</cull-face>
|
||||
<rendering-hint>opaque</rendering-hint>
|
||||
<!-- fog include for atmospheric scattering-->
|
||||
<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>
|
||||
<ground_scattering>
|
||||
<use>/environment/surface/scattering</use>
|
||||
</ground_scattering>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<terrain_alt>
|
||||
<use>/environment/mean-terrain-elevation-m</use>
|
||||
</terrain_alt>
|
||||
<overcast>
|
||||
<use>/rendering/scene/overcast</use>
|
||||
</overcast>
|
||||
<eye_alt>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</eye_alt>
|
||||
<snow_level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow_level>
|
||||
<dust_cover_factor>
|
||||
<use>/environment/surface/dust-cover-factor</use>
|
||||
</dust_cover_factor>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<fogstructure>
|
||||
<use>/environment/fog-structure</use>
|
||||
</fogstructure>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-structure</use>
|
||||
</delta_T>
|
||||
<!-- END fog include -->
|
||||
<building-flag type="int">1</building-flag>
|
||||
</parameters>
|
||||
<!-- Atmospheric scattering technique with model shader-->
|
||||
<!-- Atmospheric scattering technique -->
|
||||
<technique n="7">
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<render-bin>
|
||||
<bin-number>2</bin-number>
|
||||
<bin-name>RenderBin</bin-name>
|
||||
</render-bin>
|
||||
<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>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<!-- If there is a texture, the type in the derived effect
|
||||
will be "2d". -->
|
||||
<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>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[6]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[6]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[6]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[6]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[6]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[6]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader n="0">Shaders/Default/building-default.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<!--fog include-->
|
||||
<fragment-shader n="1">Shaders/Default/default.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>instancePosition</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>instanceScaleRotate</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rotPitchWtex0x</name>
|
||||
<index>12</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>wtex0yTex1xTex1y</name>
|
||||
<index>13</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rtex0xRtex0y</name>
|
||||
<index>14</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rooftopscale</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<!-- 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 -->
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dataBuffer</name>
|
||||
<type>sampler-1d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="8">
|
||||
<pass>
|
||||
<material>
|
||||
<active>true</active>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
|
||||
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
||||
<specular type="vec4d">0.0 0.0 0.0 1.0</specular>
|
||||
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
|
||||
<shininess>0.1</shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
||||
</material>
|
||||
<texture-unit n="4">
|
||||
<unit>4</unit>
|
||||
<image>
|
||||
<use>texture[3]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<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 n="0">
|
||||
<vertex-shader n="0">Shaders/Default/building-ubershader.vert</vertex-shader>
|
||||
<attribute>
|
||||
<name>instancePosition</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>instanceScaleRotate</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rotPitchWtex0x</name>
|
||||
<index>12</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>wtex0yTex1xTex1y</name>
|
||||
<index>13</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rtex0xRtex0y</name>
|
||||
<index>14</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rooftopscale</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<material>
|
||||
<active>true</active>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
|
||||
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
||||
<specular type="vec4d">0.0 0.0 0.0 1.0</specular>
|
||||
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
|
||||
<shininess>0.1</shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
||||
</material>
|
||||
<texture-unit n="4">
|
||||
<unit>4</unit>
|
||||
<image>
|
||||
<use>texture[3]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<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 n="0">
|
||||
<vertex-shader n="0">Shaders/Default/building-ubershader.vert</vertex-shader>
|
||||
<attribute>
|
||||
<name>instancePosition</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>instanceScaleRotate</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rotPitchWtex0x</name>
|
||||
<index>12</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>wtex0yTex1xTex1y</name>
|
||||
<index>13</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rtex0xRtex0y</name>
|
||||
<index>14</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rooftopscale</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="18">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/model</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>
|
||||
<ambient><use>material/ambient</use></ambient>
|
||||
<diffuse><use>material/diffuse</use></diffuse>
|
||||
<specular><use>material/specular</use></specular>
|
||||
<emissive><use>material/emissive</use></emissive>
|
||||
<shininess><use>material/shininess</use></shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
</material>
|
||||
<alpha-test>false</alpha-test>
|
||||
<shade-model>flat</shade-model>
|
||||
<cull-face>back</cull-face>
|
||||
<render-bin>
|
||||
<bin-number>-1</bin-number>
|
||||
<bin-name>RenderBin</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>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/building-default.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/trivial.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
||||
</pass>-->
|
||||
<pass>
|
||||
<texture-unit n="4">
|
||||
<unit>4</unit>
|
||||
<image>
|
||||
<use>texture[3]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<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 n="0">Shaders/ALS/building-model-ultra.vert</vertex-shader>
|
||||
<!--<fragment-shader n="0">Shaders/ALS/model-ultra.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/ALS/cloud-shadowfunc.frag</fragment-shader>
|
||||
<fragment-shader n="2">Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader n="3">Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader n="4">Shaders/ALS/filters.frag</fragment-shader>-->
|
||||
<attribute>
|
||||
<name>instancePosition</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>instanceScaleRotate</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rotPitchWtex0x</name>
|
||||
<index>12</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>wtex0yTex1xTex1y</name>
|
||||
<index>13</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rtex0xRtex0y</name>
|
||||
<index>14</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rooftopscale</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
</material>
|
||||
<alpha-test>false</alpha-test>
|
||||
<shade-model>flat</shade-model>
|
||||
<cull-face>back</cull-face>
|
||||
<render-bin>
|
||||
<bin-number>-1</bin-number>
|
||||
<bin-name>RenderBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<image>
|
||||
<use>texture[0]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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[6]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[6]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[6]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[6]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[6]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[6]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<!--<vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader>-->
|
||||
<!--<vertex-shader n="1">Shaders/Default/building-default.vert</vertex-shader>-->
|
||||
<vertex-shader>Shaders/Default/building-default.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/trivial.frag</fragment-shader>
|
||||
<!--<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/terrain-nocolor.frag</fragment-shader>-->
|
||||
<attribute>
|
||||
<name>instancePosition</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>instanceScaleRotate</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rotPitchWtex0x</name>
|
||||
<index>12</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>wtex0yTex1xTex1y</name>
|
||||
<index>13</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rtex0xRtex0y</name>
|
||||
<index>14</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rooftopscale</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dataBuffer</name>
|
||||
<type>sampler-1d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
||||
</pass>
|
||||
<pass>
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient>
|
||||
<use>material/ambient</use>
|
||||
</ambient>
|
||||
<diffuse>
|
||||
<use>material/diffuse</use>
|
||||
</diffuse>
|
||||
<specular>
|
||||
<use>material/specular</use>
|
||||
</specular>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
</material>
|
||||
<blend>false</blend>
|
||||
<alpha-test>false</alpha-test>
|
||||
<shade-model>flat</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>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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[6]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[6]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[6]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[6]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[6]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[6]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/building.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/terrain-base.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>instancePosition</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>instanceScaleRotate</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rotPitchWtex0x</name>
|
||||
<index>12</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>wtex0yTex1xTex1y</name>
|
||||
<index>13</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rtex0xRtex0y</name>
|
||||
<index>14</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>rooftopscale</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dataBuffer</name>
|
||||
<type>sampler-1d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>2</value>
|
||||
<!-- AMBIENT_AND_DIFFUSE -->
|
||||
</uniform>
|
||||
<depth>
|
||||
<function>lequal</function>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
460
Compositor/Effects/chute.eff
Normal file
460
Compositor/Effects/chute.eff
Normal file
|
@ -0,0 +1,460 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/chute</name>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
<parameters>
|
||||
<chute_force>1.0</chute_force>
|
||||
<chute_projection_z>0.0</chute_projection_z>
|
||||
<chute_fold>0.0</chute_fold>
|
||||
<chute_bend>0.0</chute_bend>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<rendering-hint>
|
||||
<use>rendering-hint</use>
|
||||
</rendering-hint>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<!-- If there is a texture, the type in the derived effect
|
||||
will be "2d". -->
|
||||
<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>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/chute.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/model-base.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>chute_force</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>chute_force</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>chute_fold</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>chute_fold</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>chute_bend</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>chute_bend</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>chute_projection_z</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>chute_projection_z</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_z</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_z</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_radius</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_radius</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_ambience</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_ambience</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_geo_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_geo_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>quality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tquality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>tquality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
35
Compositor/Effects/cityLM.eff
Normal file
35
Compositor/Effects/cityLM.eff
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cityLM</name>
|
||||
<inherits-from>/Effects/model-combined-deferred</inherits-from>
|
||||
<parameters>
|
||||
<!-- Light Map -->
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-multi type="int">1</lightmap-multi>
|
||||
<texture n="3">
|
||||
<image>/Textures/osm2city/atlas_facades_LM.png</image>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
</texture>
|
||||
<lightmap-factor type="float" n="0">
|
||||
<use>/environment/lightmap-factor</use>
|
||||
</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0"> 1. 0.88 0.6 </lightmap-color>
|
||||
<lightmap-factor type="float" n="1">
|
||||
<use>/scenery/osm2city/lightmap-factor</use>
|
||||
</lightmap-factor>
|
||||
<!--
|
||||
<lightmap-color type="vec3d" n="1"> 0.941 0.682 0.086 </lightmap-color>
|
||||
<lightmap-color type="vec3d" n="1"> 0.941 0.682 0.286 </lightmap-color>
|
||||
-->
|
||||
<lightmap-color type="vec3d" n="1"> 0.564 0.409 0.172 </lightmap-color>
|
||||
<lightmap-factor type="float" n="2">0</lightmap-factor>
|
||||
<lightmap-factor type="float" n="3">0</lightmap-factor>
|
||||
<snow-enabled type="int">1</snow-enabled>
|
||||
<building-flag type="int">1</building-flag>
|
||||
<!--
|
||||
<lightmap-factor type="float" n="3">1</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="3"> 1 1 1 </lightmap-color>
|
||||
-->
|
||||
</parameters>
|
||||
</PropertyList>
|
791
Compositor/Effects/cliffs.eff
Normal file
791
Compositor/Effects/cliffs.eff
Normal file
|
@ -0,0 +1,791 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cliffs</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<!-- red rock with pronounced cracks -->
|
||||
<base-color type="vec3d">0.71 0.49 0.40</base-color>
|
||||
<overlay-color type="vec3d">0.42 0.38 0.37</overlay-color>
|
||||
<overlay-alpha type="float">0.4</overlay-alpha>
|
||||
<overlay-bias type="float">0.0</overlay-bias>
|
||||
<contrast type="float">1.0</contrast>
|
||||
<crack-depth type="float">0.6</crack-depth>
|
||||
<crack-pattern-stretch type="float">7.0</crack-pattern-stretch>
|
||||
<rock-brightness type="float">0.8</rock-brightness>
|
||||
<grain-fade-power type="float">1.0</grain-fade-power>
|
||||
<rock_strata>0</rock_strata>
|
||||
<!-- dark grey rock with pronounced grain -->
|
||||
<!--<base-color type="vec3d">0.85 0.83 0.81</base-color>
|
||||
<overlay-bias type="float">0.0</overlay-bias>
|
||||
<contrast type="float">1.0</contrast>
|
||||
<crack-depth type="float">0.3</crack-depth>
|
||||
<crack-pattern-stretch type="float">3.0</crack-pattern-stretch>
|
||||
<rock-brightness type="float">0.8</rock-brightness>
|
||||
<grain-fade-power type="float">1.1</grain-fade-power>
|
||||
<rock_strata>0</rock_strata>-->
|
||||
<!-- red rock with slight crack pattern -->
|
||||
<!--<base-color type="vec3d">0.85 0.53 0.31</base-color>
|
||||
<overlay-color type="vec3d">0.9 0.95 0.94</overlay-color>
|
||||
<overlay-alpha type="float">0.1</overlay-alpha>
|
||||
<overlay-bias type="float">0.0</overlay-bias>
|
||||
<contrast type="float">0.6</contrast>
|
||||
<crack-depth type="float">0.3</crack-depth>
|
||||
<crack-pattern-stretch type="float">8.0</crack-pattern-stretch>
|
||||
<rock-brightness type="float">1.3</rock-brightness>
|
||||
<grain-fade-power type="float">1.3</grain-fade-power>
|
||||
<rock_strata>0</rock_strata>-->
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<and>
|
||||
<less-equal>
|
||||
<value type="float">6.0</value>
|
||||
<float-property>/sim/rendering/shaders/landmass</float-property>
|
||||
</less-equal>
|
||||
<less-equal>
|
||||
<value type="float">6.0</value>
|
||||
<float-property>/sim/rendering/shaders/transition</float-property>
|
||||
</less-equal>
|
||||
</and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/terrain-ultra.vert</vertex-shader>
|
||||
<vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/cliffs.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/cloud-shadowfunc.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>intrinsic_wetness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>intrinsic_wetness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>slopeline_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>slopeline_strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rock_strata</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>rock_strata</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>transition_model</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>transition_model</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_bias</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-bias</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>crack_depth</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>crack-depth</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>crack_pattern_stretch</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>crack-pattern-stretch</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_fade_power</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>grain-fade-power</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rock_brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rock-brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dust_resistance</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dust_resistance</use>
|
||||
</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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_lat</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_lat</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_lon</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_lon</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snow_thickness_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_thickness_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dust_cover_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dust_cover_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lichen_cover_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lichen_cover_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>wetness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>wetness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fogstructure</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fogstructure</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>contrast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>contrast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_alpha</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-alpha</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>base_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>base-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>overlay-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- cloud shadows -->
|
||||
<uniform>
|
||||
<name>cloudpos1_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos1_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>wind_effects</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>wind_effects</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_shadow_flag</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>cloud_shadow_flag</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>2</value>
|
||||
<!-- AMBIENT_AND_DIFFUSE -->
|
||||
</uniform>
|
||||
<depth>
|
||||
<function>lequal</function>
|
||||
<!-- <write-mask type="bool">false</write-mask> -->
|
||||
</depth>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
328
Compositor/Effects/cloud-impostor.eff
Normal file
328
Compositor/Effects/cloud-impostor.eff
Normal file
|
@ -0,0 +1,328 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cloud-impostor</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
<range>
|
||||
<use>/sim/rendering/clouds3d-vis-range</use>
|
||||
</range>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<altitude>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</altitude>
|
||||
<cloud_self_shading>
|
||||
<use>/environment/cloud-self-shading</use>
|
||||
</cloud_self_shading>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
<air_pollution>
|
||||
<use>/environment/air-pollution-norm</use>
|
||||
</air_pollution>
|
||||
<visibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</visibility>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-cloud</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/cloud-static.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/cloud-static.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/cloud-impostor.vert</vertex-shader>
|
||||
<vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/cloud-static.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>range</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>visibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>visibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
151
Compositor/Effects/cloud-models.eff
Normal file
151
Compositor/Effects/cloud-models.eff
Normal file
|
@ -0,0 +1,151 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cloud-models</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
</parameters>
|
||||
<!--
|
||||
<technique n="10">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</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>
|
||||
<emissive><use>material/emissive</use></emissive>
|
||||
<shininess><use>material/shininess</use></shininess>
|
||||
<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> -->
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<!--<unit>0</unit>-->
|
||||
<!-- If there is a texture, the type in the derived effect
|
||||
will be "2d". -->
|
||||
<!--<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>
|
||||
<program>
|
||||
<vertex-shader>Shaders/model-cloud.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/default.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value></uniform>
|
||||
</pass>
|
||||
</technique>-->
|
||||
<technique n="9">
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<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>
|
||||
-->
|
||||
<environment>
|
||||
<mode>modulate</mode>
|
||||
</environment>
|
||||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
196
Compositor/Effects/cloud-noctilucent.eff
Normal file
196
Compositor/Effects/cloud-noctilucent.eff
Normal file
|
@ -0,0 +1,196 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cloud-noctilucent</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<altitude>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</altitude>
|
||||
<cloud_self_shading>
|
||||
<use>/environment/cloud-self-shading</use>
|
||||
</cloud_self_shading>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/cloud-static.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/cloud-static.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/cloud-noctilucent.vert</vertex-shader>
|
||||
<vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/cloud-static.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
489
Compositor/Effects/cloud-static.eff
Normal file
489
Compositor/Effects/cloud-static.eff
Normal file
|
@ -0,0 +1,489 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cloud-static</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<altitude>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</altitude>
|
||||
<cloud_self_shading>
|
||||
<use>/environment/cloud-self-shading</use>
|
||||
</cloud_self_shading>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
<ring-factor>
|
||||
<use>/environment/scattering-phenomena/ring-factor</use>
|
||||
</ring-factor>
|
||||
<rainbow-factor>
|
||||
<use>/environment/scattering-phenomena/rainbow-factor</use>
|
||||
</rainbow-factor>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-cloud</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/cloud-static.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/cloud-static.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="18">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<float-property>/sim/rendering/shaders/clouds</float-property>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/cloud-static-detailed.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/cloud-static-detailed.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ring_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ring-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rainbow_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rainbow-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/cloud-static.vert</vertex-shader>
|
||||
<vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/cloud-static.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
629
Compositor/Effects/cloud.eff
Normal file
629
Compositor/Effects/cloud.eff
Normal file
|
@ -0,0 +1,629 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cloud</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
<range>
|
||||
<use>/sim/rendering/clouds3d-vis-range</use>
|
||||
</range>
|
||||
<detail>
|
||||
<use>/sim/rendering/clouds3d-detail-range</use>
|
||||
</detail>
|
||||
<scattering>
|
||||
<use>/rendering/scene/scattering</use>
|
||||
</scattering>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<altitude>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</altitude>
|
||||
<cloud_self_shading>
|
||||
<use>/environment/cloud-self-shading</use>
|
||||
</cloud_self_shading>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
<air_pollution>
|
||||
<use>/environment/air-pollution-norm</use>
|
||||
</air_pollution>
|
||||
<visibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</visibility>
|
||||
<flash>
|
||||
<use>/environment/lightning/flash</use>
|
||||
</flash>
|
||||
<lightning-pos-x>
|
||||
<use>/environment/lightning/lightning-pos-x</use>
|
||||
</lightning-pos-x>
|
||||
<lightning-pos-y>
|
||||
<use>/environment/lightning/lightning-pos-y</use>
|
||||
</lightning-pos-y>
|
||||
<lightning-range>
|
||||
<use>/environment/lightning/lightning-range</use>
|
||||
</lightning-range>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-cloud</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<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/Default/3dcloud.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/3dcloud.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>usrAttr1</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>usrAttr2</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>range</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>detail_range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>detail</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>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!--<vertex-program-two-side>true</vertex-program-two-side>-->
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="18">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<float-property>/sim/rendering/shaders/clouds</float-property>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<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/ALS/3dcloud-detailed.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/3dcloud-detailed.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>usrAttr1</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>usrAttr2</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>range</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>detail_range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>detail</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>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>visibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>visibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flash</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flash</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_pos_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-pos-x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_pos_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-pos-y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-range</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!--<vertex-program-two-side>true</vertex-program-two-side>-->
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<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/ALS/3dcloud.vert</vertex-shader>
|
||||
<vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/3dcloud.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>usrAttr1</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>usrAttr2</name>
|
||||
<index>11</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>range</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>detail_range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>detail</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>altitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>altitude</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>visibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>visibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flash</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flash</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_pos_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-pos-x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_pos_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-pos-y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-range</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!--<vertex-program-two-side>true</vertex-program-two-side>-->
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
82
Compositor/Effects/clouds-box.eff
Normal file
82
Compositor/Effects/clouds-box.eff
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/clouds-thin</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/clouds-box.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/clouds-box.frag</fragment-shader>
|
||||
<!--<attribute>
|
||||
<name>usrAttr3</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>usrAttr4</name>
|
||||
<index>11</index>
|
||||
</attribute>-->
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>false</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
74
Compositor/Effects/clouds-layered.eff
Normal file
74
Compositor/Effects/clouds-layered.eff
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/clouds-layered</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/clouds-layered.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/clouds-layered.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
74
Compositor/Effects/clouds-thick.eff
Normal file
74
Compositor/Effects/clouds-thick.eff
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/clouds-thick</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/clouds-thick.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/clouds-thick.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>false</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
82
Compositor/Effects/clouds-thin.eff
Normal file
82
Compositor/Effects/clouds-thin.eff
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/clouds-thin</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/clouds-thin.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/clouds-thin.frag</fragment-shader>
|
||||
<!--<attribute>
|
||||
<name>usrAttr3</name>
|
||||
<index>10</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>usrAttr4</name>
|
||||
<index>11</index>
|
||||
</attribute>-->
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>false</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
74
Compositor/Effects/clouds-thinlayer.eff
Normal file
74
Compositor/Effects/clouds-thinlayer.eff
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/clouds-layered</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>10</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/clouds-thinlayer.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/clouds-thinlayer.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
153
Compositor/Effects/crop.eff
Normal file
153
Compositor/Effects/crop.eff
Normal file
|
@ -0,0 +1,153 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/crop</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/crop.png</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/crop-colors.png</image>
|
||||
<type>1d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>mirror</wrap-s>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<snow-level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow-level>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/crop</property>
|
||||
<equal>
|
||||
<value type="float">0.0</value>
|
||||
<float-property>/sim/rendering/rembrandt/enabled</float-property>
|
||||
</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>
|
||||
<!-- Use material values that are either inherited from the
|
||||
terrain-default effect or supplied by an effect derived
|
||||
from this one e.g., one created in the materials library. -->
|
||||
<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>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[2]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>2</unit>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[3]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[3]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[3]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<internal-format>
|
||||
<use>texture[3]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader n="1">Shaders/Default/crop.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/crop.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>NoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SampleTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ColorsTex</name>
|
||||
<type>sampler-1d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
25
Compositor/Effects/cropgrass.eff
Normal file
25
Compositor/Effects/cropgrass.eff
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/cropgrass</name>
|
||||
<inherits-from>Effects/crop</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/cropgrass.png</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/cropgrass-colors.png</image>
|
||||
<type>1d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>mirror</wrap-s>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<snow-level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow-level>
|
||||
</parameters>
|
||||
</PropertyList>
|
928
Compositor/Effects/dirt-runway.eff
Normal file
928
Compositor/Effects/dirt-runway.eff
Normal file
|
@ -0,0 +1,928 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/dirt-runway</name>
|
||||
<inherits-from>Effects/runway</inherits-from>
|
||||
<parameters>
|
||||
<texture n="16">
|
||||
<image>Textures/Terrain/sand_hires_ochre.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="17">
|
||||
<image>Textures/Terrain/airport_grass2.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="18">
|
||||
<image>Textures/Terrain/grain_texture.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<strength_05m>0.5</strength_05m>
|
||||
<strength_1m>0.5</strength_1m>
|
||||
<strength_2m>0.0</strength_2m>
|
||||
<strength_5m>0.0</strength_5m>
|
||||
<strength_10m>0.0</strength_10m>
|
||||
<filter_threshold>0.5</filter_threshold>
|
||||
<filter_transition>0.2</filter_transition>
|
||||
<relief_strength>1.0</relief_strength>
|
||||
<bias_center>1</bias_center>
|
||||
<bias_center_strength>0.3</bias_center_strength>
|
||||
<size_base>100.0</size_base>
|
||||
<size_overlay>30.0</size_overlay>
|
||||
<size_grain>30.0</size_grain>
|
||||
<grain_strength>1.0</grain_strength>
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">4.0</value>
|
||||
<float-property>/sim/rendering/shaders/landmass</float-property>
|
||||
</less-equal>
|
||||
<less-equal>
|
||||
<value type="float">3.0</value>
|
||||
<float-property>/sim/rendering/shaders/transition</float-property>
|
||||
</less-equal>
|
||||
</or>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[16]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[16]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[16]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[16]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[16]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[16]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>4</unit>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[4]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[4]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[4]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[4]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[4]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>5</unit>
|
||||
<type>
|
||||
<use>texture[17]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[17]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[17]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[17]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[17]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[17]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>6</unit>
|
||||
<type>
|
||||
<use>texture[18]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[18]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[18]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[18]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[18]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[18]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>7</unit>
|
||||
<type>
|
||||
<use>texture[11]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[11]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[11]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[11]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[11]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[11]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader n="0">Shaders/ALS/terrain-ultra.vert</vertex-shader>
|
||||
<vertex-shader n="1">Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/ALS/drunway.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/ALS/cloud-shadowfunc.frag</fragment-shader>
|
||||
<fragment-shader n="2">Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader n="3">Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader n="4">Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader n="5">Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snow_thickness_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_thickness_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dust_cover_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dust_cover_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lichen_cover_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lichen_cover_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>size_base</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>size_base</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>size_overlay</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>size_overlay</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>size_grain</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>size_grain</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>grain_strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>strength_05m</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>strength_05m</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>strength_1m</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>strength_1m</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>strength_2m</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>strength_2m</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>strength_5m</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>strength_5m</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>strength_10m</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>strength_10m</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>filter_transition</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>filter_transition</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>filter_threshold</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>filter_threshold</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>relief_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>relief_strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>bias_center_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>bias_center_strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>wetness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>wetness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fogstructure</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fogstructure</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- cloud shadows -->
|
||||
<uniform>
|
||||
<name>cloudpos1_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos1_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_shadow_flag</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>cloud_shadow_flag</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>bias_center</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>bias_center</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>quality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tquality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>tquality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>raise_vertex</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>raise_vertex</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NormalTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">4</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>mix_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">5</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">6</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>detail_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">7</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>2</value>
|
||||
<!-- AMBIENT_AND_DIFFUSE -->
|
||||
</uniform>
|
||||
<depth>
|
||||
<function>lequal</function>
|
||||
<!-- <write-mask type="bool">false</write-mask> -->
|
||||
</depth>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
535
Compositor/Effects/flutter.eff
Normal file
535
Compositor/Effects/flutter.eff
Normal file
|
@ -0,0 +1,535 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/flutter</name>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
<parameters>
|
||||
<vertex-program-two-side type="bool">true</vertex-program-two-side>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<!-- 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>
|
||||
<use>/environment/sea/surface/wind-from-east-fps</use>
|
||||
</windE>
|
||||
<windN>
|
||||
<use>/environment/sea/surface/wind-from-north-fps</use>
|
||||
</windN>
|
||||
<speed-kt>0.0</speed-kt>
|
||||
<heading-deg>0.0</heading-deg>
|
||||
<!-- 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>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/generic</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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<!-- If there is a texture, the type in the derived effect
|
||||
will be "2d". -->
|
||||
<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>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<!-- <vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader> -->
|
||||
<vertex-shader n="1">Shaders/Default/flutter.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/default.frag</fragment-shader>
|
||||
</program>
|
||||
<!--<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>-->
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- uniform> unused?
|
||||
<name>WindSpeed</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>wind-speed</use>
|
||||
</value>
|
||||
</uniform-->
|
||||
<uniform>
|
||||
<name>Offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>AmpFactor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>amplitude-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>Noise</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>WindE</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>windE</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>WindN</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>windN</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>spd</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>speed-kt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>hdg</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>heading-deg</use>
|
||||
</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>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<!-- If there is a texture, the type in the derived effect
|
||||
will be "2d". -->
|
||||
<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>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/flutter.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/terrain-base.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>Offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>AmpFactor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>amplitude-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>Noise</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>WindE</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>windE</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>WindN</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>windN</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>spd</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>speed-kt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>hdg</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>heading-deg</use>
|
||||
</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>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- END fog include -->
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
348
Compositor/Effects/forest.eff
Normal file
348
Compositor/Effects/forest.eff
Normal file
|
@ -0,0 +1,348 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/forest</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/rock.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
<type>2d</type>
|
||||
</texture>
|
||||
<texture n="3">
|
||||
<image>Textures/Terrain/forest-colors.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>mirror</wrap-s>
|
||||
<internal-format>normalized</internal-format>
|
||||
<type>1d</type>
|
||||
</texture>
|
||||
<texture n="4">
|
||||
<image>Textures/Terrain/forest.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
<type>2d</type>
|
||||
</texture>
|
||||
<texture n="5">
|
||||
<image>Textures/Terrain/forest-relief.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
<type>2d</type>
|
||||
</texture>
|
||||
<snow-level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow-level>
|
||||
<depth-factor type="float">0.04</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
<quality-level>
|
||||
<use>/sim/rendering/shaders/transition</use>
|
||||
</quality-level>
|
||||
<!-- sets the season color -->
|
||||
<season-red type="float">0.12</season-red>
|
||||
<season-green type="float">0.86</season-green>
|
||||
<season-blue type="float">0.22</season-blue>
|
||||
<!-- end season color -->
|
||||
<!--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>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
<binormal type="int">7</binormal>
|
||||
</generate>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/transition</property>
|
||||
<equal>
|
||||
<value type="float">0.0</value>
|
||||
<float-property>/sim/rendering/rembrandt/enabled</float-property>
|
||||
</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>
|
||||
<!-- Use material values that are either inherited from the
|
||||
terrain-default effect or supplied by an effect derived
|
||||
from this one e.g., one created in the materials library. -->
|
||||
<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>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[3]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[3]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[3]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<internal-format>
|
||||
<use>texture[3]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>2</unit>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[4]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[4]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[4]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[4]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[4]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>5</unit>
|
||||
<type>
|
||||
<use>texture[5]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[5]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[5]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[5]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[5]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[5]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<!-- <vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader> -->
|
||||
<vertex-shader n="1">Shaders/Default/forest.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/forest.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>NoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SampleTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SampleTex2</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ColorsTex</name>
|
||||
<type>sampler-1d</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NormalTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">5</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>depth_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>depth-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>quality-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>red</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-red</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>green</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-green</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>blue</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-blue</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>alpha</name>
|
||||
<type>float</type>
|
||||
<value>0.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>
|
||||
</technique>
|
||||
</PropertyList>
|
348
Compositor/Effects/glacier.eff
Normal file
348
Compositor/Effects/glacier.eff
Normal file
|
@ -0,0 +1,348 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/glacier</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/rock.png</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/forest-colors.png</image>
|
||||
<type>1d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>mirror</wrap-s>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="4">
|
||||
<image>Textures/Terrain/forest.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="5">
|
||||
<image>Textures/Terrain/forest-relief.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<snow-level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow-level>
|
||||
<depth-factor type="float">0.01</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
<quality-level>
|
||||
<use>/sim/rendering/shaders/transition</use>
|
||||
</quality-level>
|
||||
<!-- sets the season color -->
|
||||
<season-red type="float">0.12</season-red>
|
||||
<season-green type="float">0.86</season-green>
|
||||
<season-blue type="float">0.22</season-blue>
|
||||
<!-- end season color -->
|
||||
<!--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>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
<binormal type="int">7</binormal>
|
||||
</generate>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/transition</property>
|
||||
<equal>
|
||||
<value type="float">0.0</value>
|
||||
<float-property>/sim/rendering/rembrandt/enabled</float-property>
|
||||
</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>
|
||||
<!-- Use material values that are either inherited from the
|
||||
terrain-default effect or supplied by an effect derived
|
||||
from this one e.g., one created in the materials library. -->
|
||||
<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>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[2]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[3]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[3]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<internal-format>
|
||||
<use>texture[3]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>2</unit>
|
||||
<image>
|
||||
<use>texture[4]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[4]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[4]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[4]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[4]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>5</unit>
|
||||
<image>
|
||||
<use>texture[5]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[5]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[5]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[5]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[5]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[5]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<!-- <vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader> -->
|
||||
<vertex-shader n="1">Shaders/Default/forest.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/forest.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>NoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SampleTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SampleTex2</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ColorsTex</name>
|
||||
<type>sampler-1d</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NormalTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">5</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>depth_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>depth-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>quality-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>red</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-red</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>green</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-green</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>blue</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-blue</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>alpha</name>
|
||||
<type>float</type>
|
||||
<value>0.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>
|
||||
</technique>
|
||||
</PropertyList>
|
694
Compositor/Effects/glass.eff
Normal file
694
Compositor/Effects/glass.eff
Normal file
|
@ -0,0 +1,694 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/glass</name>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="1">
|
||||
<image>Aircraft/Generic/Effects/window_frost.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<!-- placeholder for the function texture used for fogging, wiper area,...-->
|
||||
<texture n="2">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<!-- texture for reflections in the glass -->
|
||||
<texture n="3">
|
||||
<type>cubemap</type>
|
||||
<images>
|
||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
|
||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
|
||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
|
||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
|
||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
|
||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
|
||||
</images>
|
||||
</texture>
|
||||
<!-- placeholder lightmap texture for reflections in the glass -->
|
||||
<texture n="4">
|
||||
<type>cubemap</type>
|
||||
<images>
|
||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
|
||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
|
||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
|
||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
|
||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
|
||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
|
||||
</images>
|
||||
</texture>
|
||||
<glass-tint type="vec4d" n="0"> 1.0 1.0 1.0 1.0</glass-tint>
|
||||
<overlay-color type="vec3d" n="0"> 1.0 1.0 1.0</overlay-color>
|
||||
<splash-x>
|
||||
<use>/environment/aircraft-effects/splash-vector-x</use>
|
||||
</splash-x>
|
||||
<splash-y>
|
||||
<use>/environment/aircraft-effects/splash-vector-y</use>
|
||||
</splash-y>
|
||||
<splash-z>
|
||||
<use>/environment/aircraft-effects/splash-vector-z</use>
|
||||
</splash-z>
|
||||
<rnorm>
|
||||
<use>/environment/rain-norm</use>
|
||||
</rnorm>
|
||||
<gsnorm>
|
||||
<use>/environment/aircraft-effects/ground-splash-norm</use>
|
||||
</gsnorm>
|
||||
<frost-level>
|
||||
<use>/environment/aircraft-effects/frost-level</use>
|
||||
</frost-level>
|
||||
<surface-mapping-scheme type="int">0</surface-mapping-scheme>
|
||||
<fog-level>
|
||||
<use>/environment/aircraft-effects/fog-level</use>
|
||||
</fog-level>
|
||||
<use-wipers>
|
||||
<use>/environment/aircraft-effects/use-wipers</use>
|
||||
</use-wipers>
|
||||
<use-overlay>
|
||||
<use>/environment/aircraft-effects/use-overlay</use>
|
||||
</use-overlay>
|
||||
<overlay-alpha>
|
||||
<use>/environment/aircraft-effects/overlay-alpha</use>
|
||||
</overlay-alpha>
|
||||
<overlay-glare type="float">0.5</overlay-glare>
|
||||
<use-reflection type="int">0</use-reflection>
|
||||
<reflection-strength type="float">1.0</reflection-strength>
|
||||
<use-mask type="int">0</use-mask>
|
||||
<use-reflection-lightmap type="int">0</use-reflection-lightmap>
|
||||
<lightmap-multi type="int">0</lightmap-multi>
|
||||
<lightmap-factor type="float" n="0">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="1">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="1"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="2">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="3">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
|
||||
</parameters>
|
||||
<!-- fall back to a fixed pipeline technique equivalent to model-transparent otherwise -->
|
||||
<!-- Rembrandt technique of model-default comes at 10, so we insert before that -->
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<lighting>true</lighting>
|
||||
<depth>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<active>
|
||||
<use>texture[0]/active</use>
|
||||
</active>
|
||||
<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>
|
||||
<environment>
|
||||
<mode>modulate</mode>
|
||||
</environment>
|
||||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<depth>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<type>
|
||||
<use>texture[1]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<images>
|
||||
<use>texture[3]/images</use>
|
||||
</images>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>4</unit>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<images>
|
||||
<use>texture[4]/images</use>
|
||||
</images>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/glass.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/glass.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>tint</name>
|
||||
<type>float-vec4</type>
|
||||
<value>
|
||||
<use>glass-tint</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>overlay-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>splash_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>splash-x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>splash_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>splash-y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>splash_z</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>splash-z</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rain_norm</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rnorm</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ground_splash_norm</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gsnorm</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>frost_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>frost-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fog_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fog-level</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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>hazeLayerAltitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lthickness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>reflection_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>reflection-strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_alpha</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-alpha</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_glare</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-glare</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>frost_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>func_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cube_texture</name>
|
||||
<type>sampler-cube</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cube_light_texture</name>
|
||||
<type>sampler-cube</type>
|
||||
<value type="int">4</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_reflection</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-reflection</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_mask</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-mask</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_wipers</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-wipers</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_overlay</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-overlay</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_reflection_lightmap</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-reflection-lightmap</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_multi</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>lightmap-multi</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>adaptive_mapping</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>surface-mapping-scheme</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
1136
Compositor/Effects/grass.eff
Normal file
1136
Compositor/Effects/grass.eff
Normal file
File diff suppressed because it is too large
Load diff
347
Compositor/Effects/herbtundra.eff
Normal file
347
Compositor/Effects/herbtundra.eff
Normal file
|
@ -0,0 +1,347 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/herbtundra</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/rock.png</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/forest-colors.png</image>
|
||||
<type>1d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>mirror</wrap-s>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="4">
|
||||
<image>Textures/Terrain/forest.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="5">
|
||||
<image>Textures/Terrain/forest-relief.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<snow-level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow-level>
|
||||
<depth-factor type="float">0.01</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
<!-- sets the season color -->
|
||||
<season-red type="float">0.12</season-red>
|
||||
<season-green type="float">0.86</season-green>
|
||||
<season-blue type="float">0.22</season-blue>
|
||||
<!-- end season color -->
|
||||
<!--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>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
<quality-level>
|
||||
<use>/sim/rendering/shaders/transition</use>
|
||||
</quality-level>
|
||||
</parameters>
|
||||
<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
<binormal type="int">7</binormal>
|
||||
</generate>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/transition</property>
|
||||
<equal>
|
||||
<value type="float">0.0</value>
|
||||
<float-property>/sim/rendering/rembrandt/enabled</float-property>
|
||||
</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>
|
||||
<!-- Use material values that are either inherited from the
|
||||
terrain-default effect or supplied by an effect derived
|
||||
from this one e.g., one created in the materials library. -->
|
||||
<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>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[2]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[3]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[3]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<internal-format>
|
||||
<use>texture[3]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>2</unit>
|
||||
<image>
|
||||
<use>texture[4]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[4]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[4]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[4]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[4]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>5</unit>
|
||||
<image>
|
||||
<use>texture[5]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[5]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[5]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[5]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[5]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[5]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader n="1">Shaders/Default/forest.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/forest.frag.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>NoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SampleTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SampleTex2</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ColorsTex</name>
|
||||
<type>sampler-1d</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NormalTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">5</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>depth_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>depth-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>quality-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>red</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-red</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>green</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-green</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>blue</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>season-blue</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>alpha</name>
|
||||
<type>float</type>
|
||||
<value>0.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>
|
||||
</technique>
|
||||
</PropertyList>
|
719
Compositor/Effects/hud.eff
Normal file
719
Compositor/Effects/hud.eff
Normal file
|
@ -0,0 +1,719 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/hud</name>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="1">
|
||||
<image>Aircraft/Generic/Effects/window_frost.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<!-- placeholder for the function texture used for fogging, wiper area,...-->
|
||||
<texture n="2">
|
||||
<image>Aircraft/Generic/Effects/hud-glass.rgb</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<!-- texture for reflections in the glass -->
|
||||
<texture n="3">
|
||||
<type>cubemap</type>
|
||||
<images>
|
||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
|
||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
|
||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
|
||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
|
||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
|
||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
|
||||
</images>
|
||||
</texture>
|
||||
<!-- placeholder lightmap texture for reflections in the glass -->
|
||||
<texture n="4">
|
||||
<type>cubemap</type>
|
||||
<images>
|
||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
|
||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
|
||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
|
||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
|
||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
|
||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
|
||||
</images>
|
||||
</texture>
|
||||
<glass-tint type="vec4d" n="0"> 0.95 1.0 0.95 1.0</glass-tint>
|
||||
<overlay-color type="vec3d" n="0"> 0.8 1.0 0.9</overlay-color>
|
||||
<splash-x>
|
||||
<use>/environment/aircraft-effects/splash-vector-x</use>
|
||||
</splash-x>
|
||||
<splash-y>
|
||||
<use>/environment/aircraft-effects/splash-vector-y</use>
|
||||
</splash-y>
|
||||
<splash-z>
|
||||
<use>/environment/aircraft-effects/splash-vector-z</use>
|
||||
</splash-z>
|
||||
<rnorm>
|
||||
<use>/environment/rain-norm</use>
|
||||
</rnorm>
|
||||
<gsnorm>
|
||||
<use>/environment/aircraft-effects/ground-splash-norm</use>
|
||||
</gsnorm>
|
||||
<frost-level>
|
||||
<use>/environment/aircraft-effects/frost-level</use>
|
||||
</frost-level>
|
||||
<surface-mapping-scheme type="int">0</surface-mapping-scheme>
|
||||
<fog-level>
|
||||
<use>/environment/aircraft-effects/fog-level</use>
|
||||
</fog-level>
|
||||
<use-wipers>
|
||||
<use>/environment/aircraft-effects/use-wipers</use>
|
||||
</use-wipers>
|
||||
<use-overlay>1</use-overlay>
|
||||
<overlay-alpha type="float">0.35</overlay-alpha>
|
||||
<overlay-glare type="float">0.4</overlay-glare>
|
||||
<use-reflection type="int">0</use-reflection>
|
||||
<reflection-strength type="float">1.0</reflection-strength>
|
||||
<use-mask type="int">1</use-mask>
|
||||
<use-reflection-lightmap type="int">0</use-reflection-lightmap>
|
||||
<lightmap-multi type="int">0</lightmap-multi>
|
||||
<lightmap-factor type="float" n="0">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="1">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="1"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="2">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<lightmap-factor type="float" n="3">1.0</lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<sample-res>0.0006</sample-res>
|
||||
<sample-far>2.5</sample-far>
|
||||
<hud-brightness>1.0</hud-brightness>
|
||||
</parameters>
|
||||
<!-- fall back to a fixed pipeline technique equivalent to model-transparent otherwise -->
|
||||
<!-- Rembrandt technique of model-default comes at 10, so we insert before that -->
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<lighting>true</lighting>
|
||||
<depth>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<active>
|
||||
<use>texture[0]/active</use>
|
||||
</active>
|
||||
<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>
|
||||
<environment>
|
||||
<mode>modulate</mode>
|
||||
</environment>
|
||||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<depth>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<type>
|
||||
<use>texture[1]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<images>
|
||||
<use>texture[3]/images</use>
|
||||
</images>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>4</unit>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<images>
|
||||
<use>texture[4]/images</use>
|
||||
</images>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/hud.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/hud.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>tint</name>
|
||||
<type>float-vec4</type>
|
||||
<value>
|
||||
<use>glass-tint</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>overlay-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>splash_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>splash-x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>splash_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>splash-y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>splash_z</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>splash-z</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rain_norm</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rnorm</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ground_splash_norm</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gsnorm</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>frost_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>frost-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fog_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fog-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>sample_res</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>sample-res</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>sample_far</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>sample-far</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>hud_brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>hud-brightness</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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>hazeLayerAltitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lthickness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>reflection_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>reflection-strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_alpha</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-alpha</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_glare</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-glare</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>frost_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>func_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cube_texture</name>
|
||||
<type>sampler-cube</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cube_light_texture</name>
|
||||
<type>sampler-cube</type>
|
||||
<value type="int">4</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_reflection</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-reflection</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_mask</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-mask</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_wipers</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-wipers</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_overlay</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-overlay</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_reflection_lightmap</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-reflection-lightmap</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_multi</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>lightmap-multi</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>adaptive_mapping</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>surface-mapping-scheme</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
8
Compositor/Effects/landmass-nowood.eff
Normal file
8
Compositor/Effects/landmass-nowood.eff
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/landmass-nowood</name>
|
||||
<inherits-from>Effects/landmass</inherits-from>
|
||||
<parameters>
|
||||
<canopy-height type="float">0.0</canopy-height>
|
||||
</parameters>
|
||||
</PropertyList>
|
16
Compositor/Effects/landmass-scrub.eff
Normal file
16
Compositor/Effects/landmass-scrub.eff
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/landmass-scrub</name>
|
||||
<inherits-from>Effects/landmass</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/shrubcover-relief.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<canopy-height type="float">1.0</canopy-height>
|
||||
</parameters>
|
||||
</PropertyList>
|
578
Compositor/Effects/landmass.eff
Normal file
578
Compositor/Effects/landmass.eff
Normal file
|
@ -0,0 +1,578 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/landmass</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/forest-relief.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<snow-level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow-level>
|
||||
<depth-factor type="float">0.01</depth-factor>
|
||||
<canopy-height type="float">15.0</canopy-height>
|
||||
<quality-level>
|
||||
<use>/sim/rendering/shaders/landmass</use>
|
||||
</quality-level>
|
||||
<!--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>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
<binormal type="int">7</binormal>
|
||||
</generate>
|
||||
<technique n="8">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/landmass</property>
|
||||
<less-equal>
|
||||
<value type="float">4.0</value>
|
||||
<float-property>/sim/rendering/shaders/landmass</float-property>
|
||||
</less-equal>
|
||||
<equal>
|
||||
<value type="float">0.0</value>
|
||||
<float-property>/sim/rendering/rembrandt/enabled</float-property>
|
||||
</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>
|
||||
<extension-supported>GL_EXT_geometry_shader4</extension-supported>
|
||||
</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>
|
||||
<alpha-test>
|
||||
<use>transparent</use>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<cull-face>back</cull-face>
|
||||
<render-bin>
|
||||
<bin-number>-1</bin-number>
|
||||
<bin-name>RenderBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[0]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<program>
|
||||
<vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader>
|
||||
<vertex-shader n="1">Shaders/Default/landmass-g.vert</vertex-shader>
|
||||
<geometry-shader>Shaders/Default/landmass.geom</geometry-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/terrain-nocolor.frag</fragment-shader>
|
||||
<geometry-vertices-out type="int">18</geometry-vertices-out>
|
||||
<geometry-input-type>triangles</geometry-input-type>
|
||||
<geometry-output-type>triangle-strip</geometry-output-type>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>canopy_height</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>canopy-height</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
||||
|
||||
<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>
|
||||
-->
|
||||
<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>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[0]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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>2</unit>
|
||||
<image>
|
||||
<use>texture[2]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<!-- <vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader> -->
|
||||
<vertex-shader n="1">Shaders/Default/landmass-g.vert</vertex-shader>
|
||||
<geometry-shader>Shaders/Default/landmass.geom</geometry-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/landmass.frag</fragment-shader>
|
||||
<geometry-vertices-out type="int">18</geometry-vertices-out>
|
||||
<geometry-input-type>triangles</geometry-input-type>
|
||||
<geometry-output-type>triangle-strip</geometry-output-type>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>NoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>BaseTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NormalTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>depth_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>depth-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>canopy_height</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>canopy-height</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>quality-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<depth>
|
||||
<function>lequal</function>
|
||||
<!-- <write-mask type="bool">false</write-mask> -->
|
||||
</depth>
|
||||
<!-- 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>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/landmass</property>
|
||||
<equal>
|
||||
<value type="float">0.0</value>
|
||||
<float-property>/sim/rendering/rembrandt/enabled</float-property>
|
||||
</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>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[0]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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>2</unit>
|
||||
<image>
|
||||
<use>texture[2]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<!-- <vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader> -->
|
||||
<vertex-shader n="1">Shaders/Default/landmass.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/landmass.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>NoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>BaseTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NormalTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>depth_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>depth-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>quality-level</use>
|
||||
</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>
|
||||
</technique>
|
||||
</PropertyList>
|
96
Compositor/Effects/lfeat.eff
Normal file
96
Compositor/Effects/lfeat.eff
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/lfeat</name>
|
||||
<inherits-from>Effects/runway</inherits-from>
|
||||
<parameters>
|
||||
<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>
|
||||
<specular type="vec4d">
|
||||
1.0 1.0 1.0 1.0
|
||||
</specular>
|
||||
<emissive type="vec4d">
|
||||
0.0 0.0 0.0 1.0
|
||||
</emissive>
|
||||
<shininess>1.2</shininess>
|
||||
</material>
|
||||
<transparent>true</transparent>
|
||||
<raise_vertex type="bool">true</raise_vertex>
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<equal>
|
||||
<value type="bool">false</value>
|
||||
</equal>
|
||||
</predicate>
|
||||
<pass>
|
||||
<lighting>true</lighting>
|
||||
<depth>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
<material>
|
||||
<ambient>
|
||||
<use>material/ambient</use>
|
||||
</ambient>
|
||||
<diffuse>
|
||||
<use>material/diffuse</use>
|
||||
</diffuse>
|
||||
<specular>
|
||||
<use>material/specular</use>
|
||||
</specular>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>7</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<image>
|
||||
<use>texture[0]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<polygon-offset>
|
||||
<factor>-0.5</factor>
|
||||
<units>-2.0</units>
|
||||
</polygon-offset>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
9
Compositor/Effects/lightning.eff
Normal file
9
Compositor/Effects/lightning.eff
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- lightning -->
|
||||
<PropertyList>
|
||||
<name>Effects/lightning</name>
|
||||
<inherits-from>Effects/rain-layer</inherits-from>
|
||||
<parameters>
|
||||
<is-lightning type="bool">1</is-lightning>
|
||||
</parameters>
|
||||
</PropertyList>
|
11
Compositor/Effects/material-diffuse.eff
Normal file
11
Compositor/Effects/material-diffuse.eff
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/material-diffuse</name>
|
||||
<parameters>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
</material>
|
||||
</parameters>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
</PropertyList>
|
11
Compositor/Effects/material-off.eff
Normal file
11
Compositor/Effects/material-off.eff
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/material-off</name>
|
||||
<parameters>
|
||||
<material>
|
||||
<color-mode-uniform>0</color-mode-uniform>
|
||||
<!-- OFF -->
|
||||
</material>
|
||||
</parameters>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
</PropertyList>
|
5
Compositor/Effects/model-combined-deferred.eff
Normal file
5
Compositor/Effects/model-combined-deferred.eff
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/model-combined-deferred</name>
|
||||
<inherits-from>Effects/model-combined</inherits-from>
|
||||
</PropertyList>
|
115
Compositor/Effects/model-combined-transparent.eff
Normal file
115
Compositor/Effects/model-combined-transparent.eff
Normal file
|
@ -0,0 +1,115 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Stub effect file for transparent Rembrandt ported model-combined,
|
||||
to provide glass/transparent surfaces with the ubershader active,
|
||||
and fallback to plain transparency when the model shader is disabled.
|
||||
-->
|
||||
<PropertyList>
|
||||
<name>Effects/model-combined-transparent</name>
|
||||
<inherits-from>Effects/model-combined</inherits-from>
|
||||
<!-- Rembrandt rendering -->
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<equal>
|
||||
<float-property>/sim/rendering/shaders/model</float-property>
|
||||
<value type="float">0.0</value>
|
||||
</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>
|
||||
<depth>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<active>
|
||||
<use>texture[0]/active</use>
|
||||
</active>
|
||||
<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>
|
||||
-->
|
||||
<environment>
|
||||
<mode>modulate</mode>
|
||||
</environment>
|
||||
</texture-unit>
|
||||
<!-- 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?
|
||||
-->
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
2002
Compositor/Effects/model-combined.eff
Normal file
2002
Compositor/Effects/model-combined.eff
Normal file
File diff suppressed because it is too large
Load diff
790
Compositor/Effects/model-default.eff
Normal file
790
Compositor/Effects/model-default.eff
Normal file
|
@ -0,0 +1,790 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/model-default</name>
|
||||
<!-- <inherits-from>Effects/shadow</inherits-from> -->
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<vertex-program-two-side type="bool">false</vertex-program-two-side>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
</material>
|
||||
<material-id>0</material-id>
|
||||
<!-- BEGIN 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>
|
||||
<ground_scattering>
|
||||
<use>/environment/surface/scattering</use>
|
||||
</ground_scattering>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<terrain_alt>
|
||||
<use>/environment/mean-terrain-elevation-m</use>
|
||||
</terrain_alt>
|
||||
<overcast>
|
||||
<use>/rendering/scene/overcast</use>
|
||||
</overcast>
|
||||
<eye_alt>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</eye_alt>
|
||||
<cloud_self_shading>
|
||||
<use>/environment/cloud-self-shading</use>
|
||||
</cloud_self_shading>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<air_pollution>
|
||||
<use>/environment/air-pollution-norm</use>
|
||||
</air_pollution>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-structure</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
<view_pitch_offset>
|
||||
<use>/sim/current-view/pitch-offset-deg</use>
|
||||
</view_pitch_offset>
|
||||
<view_heading_offset>
|
||||
<use>/sim/current-view/heading-offset-deg</use>
|
||||
</view_heading_offset>
|
||||
<view_fov>
|
||||
<use>/sim/current-view/field-of-view</use>
|
||||
</view_fov>
|
||||
<use_searchlight>
|
||||
<use>/sim/rendering/als-secondary-lights/use-searchlight</use>
|
||||
</use_searchlight>
|
||||
<use_landing_light>
|
||||
<use>/sim/rendering/als-secondary-lights/use-landing-light</use>
|
||||
</use_landing_light>
|
||||
<use_alt_landing_light>
|
||||
<use>/sim/rendering/als-secondary-lights/use-alt-landing-light</use>
|
||||
</use_alt_landing_light>
|
||||
<landing_light1_offset>
|
||||
<use>/sim/rendering/als-secondary-lights/landing-light1-offset-deg</use>
|
||||
</landing_light1_offset>
|
||||
<landing_light2_offset>
|
||||
<use>/sim/rendering/als-secondary-lights/landing-light2-offset-deg</use>
|
||||
</landing_light2_offset>
|
||||
<landing_light3_offset>
|
||||
<use>/sim/rendering/als-secondary-lights/landing-light3-offset-deg</use>
|
||||
</landing_light3_offset>
|
||||
<use_geo_light type="int">0</use_geo_light>
|
||||
<geo_light_r type="float">0.0</geo_light_r>
|
||||
<geo_light_g type="float">0.0</geo_light_g>
|
||||
<geo_light_b type="float">0.0</geo_light_b>
|
||||
<geo_light_x type="float">0.0</geo_light_x>
|
||||
<geo_light_y type="float">0.0</geo_light_y>
|
||||
<geo_light_z type="float">0.0</geo_light_z>
|
||||
<geo_light_radius type="float">0.0</geo_light_radius>
|
||||
<geo_ambience type="float">0.0</geo_ambience>
|
||||
<quality_level>
|
||||
<use>/sim/rendering/shaders/landmass</use>
|
||||
</quality_level>
|
||||
<tquality_level>
|
||||
<use>/sim/rendering/shaders/transition</use>
|
||||
</tquality_level>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<technique n="8">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/generic</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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<!-- If there is a texture, the type in the derived effect
|
||||
will be "2d". -->
|
||||
<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>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program n="0">
|
||||
<!-- <vertex-shader n="0">Shaders/Default/include_fog.vert</vertex-shader> -->
|
||||
<!--fog include-->
|
||||
<vertex-shader n="1">Shaders/Default/default.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<!--fog include-->
|
||||
<fragment-shader n="1">Shaders/Default/default.frag</fragment-shader>
|
||||
</program>
|
||||
<!-- 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 -->
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<!-- 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?
|
||||
-->
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<!--<render-bin>
|
||||
<bin-number>1</bin-number>
|
||||
<bin-name>RenderBin</bin-name>
|
||||
</render-bin>-->
|
||||
<rendering-hint>
|
||||
<use>rendering-hint</use>
|
||||
</rendering-hint>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<!-- If there is a texture, the type in the derived effect
|
||||
will be "2d". -->
|
||||
<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>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/generic-base.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/model-base.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_z</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_z</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_radius</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_radius</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_ambience</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_ambience</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_geo_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_geo_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>quality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tquality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>tquality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
900
Compositor/Effects/model-interior-display.eff
Normal file
900
Compositor/Effects/model-interior-display.eff
Normal file
|
@ -0,0 +1,900 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/model-interior-display</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<texture n="5">
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
<image>Aircraft/Generic/Effects/dust-effect-overlay.png</image>
|
||||
</texture>
|
||||
<sample-res>0.0007</sample-res>
|
||||
<dirt-factor>3.0</dirt-factor>
|
||||
<contrast>1.0</contrast>
|
||||
</parameters>
|
||||
<!-- <technique n="4">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/skydome</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>
|
||||
<emissive><use>material/emissive</use></emissive>
|
||||
<shininess><use>material/shininess</use></shininess>
|
||||
<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>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>4</unit>
|
||||
<type><use>texture[4]/type</use></type>
|
||||
<images><use>texture[4]/images</use></images>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/generic-base.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/model-interior-base.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value><use>ground_scattering</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value><use>terminator</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value><use>terrain_alt</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value><use>overcast</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value><use>eye_alt</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value><use>cloud_self_shading</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value><use>moonlight</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>offset_vec</name>
|
||||
<type>float-vec3</type>
|
||||
<value><use>opacity-cube-center</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>scale_vec</name>
|
||||
<type>float-vec3</type>
|
||||
<value><use>opacity-cube-scale</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>angle</name>
|
||||
<type>float</type>
|
||||
<value><use>opacity-cube-angle</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tag_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value><use>implicit-lightmap-tag-color</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>emit_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value><use>implicit-lightmap-emit-color</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_filter_one</name>
|
||||
<type>float-vec3</type>
|
||||
<value><use>light-filter-one</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_filter_two</name>
|
||||
<type>float-vec3</type>
|
||||
<value><use>light-filter-two</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_radius</name>
|
||||
<type>float</type>
|
||||
<value><use>light-radius</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>threshold_low</name>
|
||||
<type>float</type>
|
||||
<value><use>implicit-lightmap-threshold-low</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>threshold_high</name>
|
||||
<type>float</type>
|
||||
<value><use>implicit-lightmap-threshold-high</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>emit_intensity</name>
|
||||
<type>float</type>
|
||||
<value><use>implicit-lightmap-intensity</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value><use>view_pitch_offset</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value><use>view_heading_offset</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value><use>view_fov</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value><use>display_xsize</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value><use>display_ysize</use></value>
|
||||
</uniform> -->
|
||||
<!-- filtering -->
|
||||
<!--<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value><use>gamma</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value><use>brightness</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value><use>use_filtering</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value><use>use_night_vision</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value><use>use_IR_vision</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value><use>delta_T</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cube_texture</name>
|
||||
<type>sampler-cube</type>
|
||||
<value type="int">4</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value><use>material/color-mode-uniform</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>int</type>
|
||||
<value><use>quality_level</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tquality_level</name>
|
||||
<type>int</type>
|
||||
<value><use>tquality_level</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>implicit_lightmap_enabled</name>
|
||||
<type>int</type>
|
||||
<value><use>implicit-lightmap-enabled</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_flashlight</name>
|
||||
<type>int</type>
|
||||
<value><use>use-flashlight</use></value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>-->
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<float-property>/sim/rendering/shaders/model</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>
|
||||
<active>
|
||||
<use>material/active</use>
|
||||
</active>
|
||||
<ambient>
|
||||
<use>material/ambient</use>
|
||||
</ambient>
|
||||
<diffuse>
|
||||
<use>material/diffuse</use>
|
||||
</diffuse>
|
||||
<specular>
|
||||
<use>material/specular</use>
|
||||
</specular>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>3</unit>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>4</unit>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<images>
|
||||
<use>texture[4]/images</use>
|
||||
</images>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>5</unit>
|
||||
<type>
|
||||
<use>texture[5]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[5]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[5]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[5]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[5]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>7</unit>
|
||||
<type>
|
||||
<use>texture[7]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[7]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[7]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[7]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[7]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/model-interior-detailed.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/model-interior-display.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>offset_vec</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>opacity-cube-center</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>scale_vec</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>opacity-cube-scale</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>angle</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>opacity-cube-angle</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tag_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>implicit-lightmap-tag-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>emit_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>implicit-lightmap-emit-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_filter_one</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>light-filter-one</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_filter_two</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>light-filter-two</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_radius</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>light-radius</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>threshold_low</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>implicit-lightmap-threshold-low</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>threshold_high</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>implicit-lightmap-threshold-high</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>emit_intensity</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>implicit-lightmap-intensity</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_magnification</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>grain-magnification</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>irradiance_map_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>irradiance-map-strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ra_irradiance_map_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ra-irradiance-map-strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>residual_ambience_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>residual-ambience-r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>residual_ambience_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>residual-ambience-g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>residual_ambience_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>residual-ambience-b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>sample_res</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>sample-res</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dirt-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>contrast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>contrast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cube_texture</name>
|
||||
<type>sampler-cube</type>
|
||||
<value type="int">4</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dust_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">5</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">7</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>quality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>quality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>tquality_level</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>tquality_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>implicit_lightmap_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>implicit-lightmap-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_flashlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use-flashlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>lightmap-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_multi</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>lightmap-multi</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>irradiance_map_type</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>irradiance-map-type</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ra_irradiance_map_type</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>ra-irradiance-map-type</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_texture_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>grain-texture-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
1052
Compositor/Effects/model-interior.eff
Normal file
1052
Compositor/Effects/model-interior.eff
Normal file
File diff suppressed because it is too large
Load diff
120
Compositor/Effects/model-transparent.eff
Normal file
120
Compositor/Effects/model-transparent.eff
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/model-transparent</name>
|
||||
<!-- <inherits-from>Effects/shadow</inherits-from> -->
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<vertex-program-two-side type="bool">false</vertex-program-two-side>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
</material>
|
||||
<!-- BEGIN 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>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<lighting>true</lighting>
|
||||
<depth>
|
||||
<write-mask type="bool">false</write-mask>
|
||||
</depth>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<active>
|
||||
<use>texture[0]/active</use>
|
||||
</active>
|
||||
<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>
|
||||
-->
|
||||
<environment>
|
||||
<mode>modulate</mode>
|
||||
</environment>
|
||||
</texture-unit>
|
||||
<!-- 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?
|
||||
-->
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
1962
Compositor/Effects/model-wingflex-organic.eff
Normal file
1962
Compositor/Effects/model-wingflex-organic.eff
Normal file
File diff suppressed because it is too large
Load diff
279
Compositor/Effects/planet-aurora.eff
Normal file
279
Compositor/Effects/planet-aurora.eff
Normal file
|
@ -0,0 +1,279 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/aurora</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<vertex-program-two-side type="bool">true</vertex-program-two-side>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
</material>
|
||||
<strength>
|
||||
<use>/environment/aurora/strength</use>
|
||||
</strength>
|
||||
<ray_factor>
|
||||
<use>/environment/aurora/ray-factor</use>
|
||||
</ray_factor>
|
||||
<upper_alt_factor>
|
||||
<use>/environment/aurora/upper-alt-factor</use>
|
||||
</upper_alt_factor>
|
||||
<penetration_factor>
|
||||
<use>/environment/aurora/penetration-factor</use>
|
||||
</penetration_factor>
|
||||
<patchiness>
|
||||
<use>/environment/aurora/patchiness</use>
|
||||
</patchiness>
|
||||
<afterglow>
|
||||
<use>/environment/aurora/afterglow</use>
|
||||
</afterglow>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-cloud</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
<arc_id>0.0</arc_id>
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<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>
|
||||
</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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>
|
||||
<use>material/color-mode</use>
|
||||
</color-mode>
|
||||
</material>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</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>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
</texture-unit>
|
||||
<vertex-program-two-side>
|
||||
<use>vertex-program-two-side</use>
|
||||
</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/planet-aurora.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/planet-aurora.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ray_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ray_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>upper_alt_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>upper_alt_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>penetration_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>penetration_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>patchiness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>patchiness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>afterglow</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>afterglow</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>arc_id</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>arc_id</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
441
Compositor/Effects/planet-cloudlayer.eff
Normal file
441
Compositor/Effects/planet-cloudlayer.eff
Normal file
|
@ -0,0 +1,441 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/planet-cloudlayer</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<texture n="1">
|
||||
<image>Models/Astro/cloud_structure.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<vertex-program-two-side type="bool">false</vertex-program-two-side>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
</material>
|
||||
<visibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</visibility>
|
||||
<use-overlay-textures>
|
||||
<use>/earthview/overlay-texture-flag</use>
|
||||
</use-overlay-textures>
|
||||
<use-cloud-normals>
|
||||
<use>/earthview/cloud-normal-flag</use>
|
||||
</use-cloud-normals>
|
||||
<shade-effect>
|
||||
<use>/earthview/shade-effect</use>
|
||||
</shade-effect>
|
||||
<cloudcover-bias>
|
||||
<use>/earthview/cloudcover-bias</use>
|
||||
</cloudcover-bias>
|
||||
<sun-angle>
|
||||
<use>/sim/time/sun-angle-rad</use>
|
||||
</sun-angle>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
<air_pollution>
|
||||
<use>/environment/air-pollution-norm</use>
|
||||
</air_pollution>
|
||||
<roi_x1>
|
||||
<use>/earthview/roi-x1</use>
|
||||
</roi_x1>
|
||||
<roi_y1>
|
||||
<use>/earthview/roi-y1</use>
|
||||
</roi_y1>
|
||||
<lightning>
|
||||
<use>/earthview/lightning</use>
|
||||
</lightning>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-cloud</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
</parameters>
|
||||
<generate>
|
||||
<normal type="int">15</normal>
|
||||
<tangent type="int">6</tangent>
|
||||
</generate>
|
||||
<technique n="8">
|
||||
<predicate>
|
||||
<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>
|
||||
</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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>
|
||||
<use>material/color-mode</use>
|
||||
</color-mode>
|
||||
</material>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<shade-model>smooth</shade-model>
|
||||
<cull-face>
|
||||
<use>cull-face</use>
|
||||
</cull-face>
|
||||
<rendering-hint>transparent</rendering-hint>
|
||||
<render-bin>
|
||||
<bin-number>110</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[1]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[1]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/planet.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/planet-cloudlayer.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>normal</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>structure_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_overlay</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-overlay-textures</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_cloud_normals</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-cloud-normals</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>visibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>visibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>shade_effect</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>shade-effect</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudcover_bias</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudcover-bias</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>sun_angle</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>sun-angle</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>roi_x1</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>roi_x1</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>roi_y1</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>roi_y1</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<!-- 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?
|
||||
-->
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
758
Compositor/Effects/planet.eff
Normal file
758
Compositor/Effects/planet.eff
Normal file
|
@ -0,0 +1,758 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/planet</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<texture n="1">
|
||||
<image>Textures/Terrain/void.png</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/grain_texture.png</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/void.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<vertex-program-two-side type="bool">false</vertex-program-two-side>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
</material>
|
||||
<visibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</visibility>
|
||||
<air_pollution>
|
||||
<use>/environment/air-pollution-norm</use>
|
||||
</air_pollution>
|
||||
<use-clouds>
|
||||
<use>/earthview/cloudsphere-flag</use>
|
||||
</use-clouds>
|
||||
<use-cloud-shadows>
|
||||
<use>/earthview/cloud-shadow-flag</use>
|
||||
</use-cloud-shadows>
|
||||
<use-overlay-textures>
|
||||
<use>/earthview/overlay-texture-flag</use>
|
||||
</use-overlay-textures>
|
||||
<sun-angle>
|
||||
<use>/sim/time/sun-angle-rad</use>
|
||||
</sun-angle>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-cloud</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
</parameters>
|
||||
<generate>
|
||||
<normal type="int">15</normal>
|
||||
<tangent type="int">6</tangent>
|
||||
</generate>
|
||||
<technique n="7">
|
||||
<predicate>
|
||||
<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>
|
||||
</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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>
|
||||
<use>material/color-mode</use>
|
||||
</color-mode>
|
||||
</material>
|
||||
<blend>
|
||||
<use>transparent</use>
|
||||
</blend>
|
||||
<alpha-test>
|
||||
<active type="bool">false</active>
|
||||
</alpha-test>
|
||||
<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>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[1]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[1]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<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/ALS/planet.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/planet.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>normal</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>shadowtex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>visibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>visibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>sun_angle</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>sun-angle</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_clouds</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-clouds</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_overlay</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-overlay-textures</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_cloud_shadows</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-cloud-shadows</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="8">
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<!-- 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?
|
||||
-->
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<property>/earthview/normal-flag</property>
|
||||
</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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<color-mode>
|
||||
<use>material/color-mode</use>
|
||||
</color-mode>
|
||||
</material>
|
||||
<blend>
|
||||
<use>transparent</use>
|
||||
</blend>
|
||||
<alpha-test>
|
||||
<active type="bool">false</active>
|
||||
</alpha-test>
|
||||
<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>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<image>
|
||||
<use>texture[1]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[1]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<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/ALS/planet.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/planet-high.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>normal</name>
|
||||
<index>15</index>
|
||||
</attribute>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>shadowtex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>normal_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>visibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>visibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>sun_angle</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>sun-angle</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_clouds</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-clouds</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_overlay</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-overlay-textures</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_cloud_shadows</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use-cloud-shadows</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
300
Compositor/Effects/procedural-light.eff
Normal file
300
Compositor/Effects/procedural-light.eff
Normal file
|
@ -0,0 +1,300 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/procedural-light</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<light_color_base_r type="float">1.0</light_color_base_r>
|
||||
<light_color_base_g type="float">0.0</light_color_base_g>
|
||||
<light_color_base_b type="float">0.0</light_color_base_b>
|
||||
<light_color_center_r type="float">1.0</light_color_center_r>
|
||||
<light_color_center_g type="float">1.0</light_color_center_g>
|
||||
<light_color_center_b type="float">1.0</light_color_center_b>
|
||||
<intensity_scale type="float">1.0</intensity_scale>
|
||||
<pointing_x type="float">-1.0</pointing_x>
|
||||
<pointing_y type="float">0.0</pointing_y>
|
||||
<pointing_z type="float">0.0</pointing_z>
|
||||
<is_directional type="bool">false</is_directional>
|
||||
<is_strobe type="bool">false</is_strobe>
|
||||
<inner_angle type="float">0.2</inner_angle>
|
||||
<outer_angle type="float">0.4</outer_angle>
|
||||
<zero_angle type="float">0.7</zero_angle>
|
||||
<outer_gain type="float">0.5</outer_gain>
|
||||
<visibility>
|
||||
<use>/environment/ground-visibility-m</use>
|
||||
</visibility>
|
||||
<avisibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</avisibility>
|
||||
<lthickness>
|
||||
<use>/environment/ground-haze-thickness-m</use>
|
||||
</lthickness>
|
||||
<terrain_alt>
|
||||
<use>/environment/mean-terrain-elevation-m</use>
|
||||
</terrain_alt>
|
||||
<eye_alt>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</eye_alt>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<active>
|
||||
<use>texture[0]/active</use>
|
||||
</active>
|
||||
<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>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<vertex-program-two-side>false</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/light.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/light.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>light_color_base_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>light_color_base_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_color_base_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>light_color_base_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_color_base_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>light_color_base_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_color_center_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>light_color_center_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_color_center_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>light_color_center_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>light_color_center_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>light_color_center_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>intensity_scale</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>intensity_scale</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>pointing_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>pointing_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>pointing_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>pointing_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>pointing_z</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>pointing_z</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>inner_angle</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>inner_angle</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>outer_angle</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>outer_angle</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>zero_angle</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>zero_angle</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>outer_gain</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>outer_gain</use>
|
||||
</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>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>is_directional</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>is_directional</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>is_strobe</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>is_strobe</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
342
Compositor/Effects/rain-layer.eff
Normal file
342
Compositor/Effects/rain-layer.eff
Normal file
|
@ -0,0 +1,342 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/rain-layer</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
</texture>
|
||||
<range>
|
||||
<use>/sim/rendering/clouds3d-vis-range</use>
|
||||
</range>
|
||||
<scattering>
|
||||
<use>/rendering/scene/scattering</use>
|
||||
</scattering>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<flash>
|
||||
<use>/environment/lightning/flash</use>
|
||||
</flash>
|
||||
<lightning-pos-x>
|
||||
<use>/environment/lightning/lightning-pos-x</use>
|
||||
</lightning-pos-x>
|
||||
<lightning-pos-y>
|
||||
<use>/environment/lightning/lightning-pos-y</use>
|
||||
</lightning-pos-y>
|
||||
<lightning-range>
|
||||
<use>/environment/lightning/lightning-range</use>
|
||||
</lightning-range>
|
||||
<is-lightning type="bool">0</is-lightning>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<delta_T>
|
||||
<use>/environment/surface/delta-T-cloud</use>
|
||||
</delta_T>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
</parameters>
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/rain-layer.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/rain-layer.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>range</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>
|
||||
<vertex-program-two-side>true</vertex-program-two-side>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/clouds3d-enable</property>
|
||||
<less-equal>
|
||||
<value type="float">1.0</value>
|
||||
<shader-language/>
|
||||
</less-equal>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass n="0">
|
||||
<!-- This is apparently not used, so maybe we'll blow it way soon. -->
|
||||
<lighting>true</lighting>
|
||||
<material>
|
||||
<ambient type="vec4d">0.5 0.5 0.5 1.0</ambient>
|
||||
<diffuse type="vec4d">0.5 0.5 0.5 1.0</diffuse>
|
||||
<color-mode>off</color-mode>
|
||||
</material>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.01</reference>
|
||||
</alpha-test>
|
||||
<shade-model>smooth</shade-model>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<render-bin>
|
||||
<bin-number>9</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<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>
|
||||
<!--<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>-->
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/rain-layer.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/rain-layer.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>baseTexture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>range</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>flash</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flash</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_pos_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-pos-x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_pos_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-pos-y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightning_range</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightning-range</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>is_lightning</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>is-lightning</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!--<vertex-program-two-side>true</vertex-program-two-side>-->
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
9
Compositor/Effects/road-high.eff
Normal file
9
Compositor/Effects/road-high.eff
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/road-high</name>
|
||||
<inherits-from>Effects/road</inherits-from>
|
||||
<parameters>
|
||||
<speed-factor>1.2</speed-factor>
|
||||
<base-density>3.0</base-density>
|
||||
</parameters>
|
||||
</PropertyList>
|
9
Compositor/Effects/road-low.eff
Normal file
9
Compositor/Effects/road-low.eff
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/road-low</name>
|
||||
<inherits-from>Effects/road</inherits-from>
|
||||
<parameters>
|
||||
<speed-factor>0.3</speed-factor>
|
||||
<base-density>0.2</base-density>
|
||||
</parameters>
|
||||
</PropertyList>
|
9
Compositor/Effects/road-mid.eff
Normal file
9
Compositor/Effects/road-mid.eff
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/road-mid</name>
|
||||
<inherits-from>Effects/road</inherits-from>
|
||||
<parameters>
|
||||
<speed-factor>0.8</speed-factor>
|
||||
<base-density>0.25</base-density>
|
||||
</parameters>
|
||||
</PropertyList>
|
1164
Compositor/Effects/road.eff
Normal file
1164
Compositor/Effects/road.eff
Normal file
File diff suppressed because it is too large
Load diff
791
Compositor/Effects/rock.eff
Normal file
791
Compositor/Effects/rock.eff
Normal file
|
@ -0,0 +1,791 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/rock</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<!-- light grey rock with pronounced cracks -->
|
||||
<base-color type="vec3d">0.9 0.95 0.94</base-color>
|
||||
<overlay-color type="vec3d">0.9 0.95 0.94</overlay-color>
|
||||
<overlay-alpha type="float">0.4</overlay-alpha>
|
||||
<overlay-bias type="float">0.0</overlay-bias>
|
||||
<contrast type="float">1.0</contrast>
|
||||
<crack-depth type="float">0.6</crack-depth>
|
||||
<crack-pattern-stretch type="float">7.0</crack-pattern-stretch>
|
||||
<rock-brightness type="float">1.0</rock-brightness>
|
||||
<grain-fade-power type="float">1.0</grain-fade-power>
|
||||
<rock_strata>0</rock_strata>
|
||||
<!-- dark grey rock with pronounced grain -->
|
||||
<!--<base-color type="vec3d">0.85 0.83 0.81</base-color>
|
||||
<overlay-bias type="float">0.0</overlay-bias>
|
||||
<contrast type="float">1.0</contrast>
|
||||
<crack-depth type="float">0.3</crack-depth>
|
||||
<crack-pattern-stretch type="float">3.0</crack-pattern-stretch>
|
||||
<rock-brightness type="float">0.8</rock-brightness>
|
||||
<grain-fade-power type="float">1.1</grain-fade-power>
|
||||
<rock_strata>0</rock_strata>-->
|
||||
<!-- red rock with slight crack pattern -->
|
||||
<!--<base-color type="vec3d">0.85 0.53 0.31</base-color>
|
||||
<overlay-color type="vec3d">0.9 0.95 0.94</overlay-color>
|
||||
<overlay-alpha type="float">0.1</overlay-alpha>
|
||||
<overlay-bias type="float">0.0</overlay-bias>
|
||||
<contrast type="float">0.6</contrast>
|
||||
<crack-depth type="float">0.3</crack-depth>
|
||||
<crack-pattern-stretch type="float">8.0</crack-pattern-stretch>
|
||||
<rock-brightness type="float">1.3</rock-brightness>
|
||||
<grain-fade-power type="float">1.3</grain-fade-power>
|
||||
<rock_strata>0</rock_strata>-->
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<and>
|
||||
<less-equal>
|
||||
<value type="float">6.0</value>
|
||||
<float-property>/sim/rendering/shaders/landmass</float-property>
|
||||
</less-equal>
|
||||
<less-equal>
|
||||
<value type="float">6.0</value>
|
||||
<float-property>/sim/rendering/shaders/transition</float-property>
|
||||
</less-equal>
|
||||
</and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/terrain-ultra.vert</vertex-shader>
|
||||
<vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/rock.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/cloud-shadowfunc.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>intrinsic_wetness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>intrinsic_wetness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>slopeline_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>slopeline_strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rock_strata</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>rock_strata</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>transition_model</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>transition_model</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_bias</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-bias</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>crack_depth</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>crack-depth</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>crack_pattern_stretch</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>crack-pattern-stretch</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_fade_power</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>grain-fade-power</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rock_brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rock-brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dust_resistance</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dust_resistance</use>
|
||||
</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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_lat</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_lat</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_lon</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_lon</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snowlevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snow_thickness_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow_thickness_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dust_cover_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dust_cover_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lichen_cover_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lichen_cover_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>wetness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>wetness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fogstructure</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fogstructure</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>contrast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>contrast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_alpha</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overlay-alpha</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>base_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>base-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>overlay-color</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- filtering -->
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- cloud shadows -->
|
||||
<uniform>
|
||||
<name>cloudpos1_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos1_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>wind_effects</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>wind_effects</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_shadow_flag</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>cloud_shadow_flag</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>2</value>
|
||||
<!-- AMBIENT_AND_DIFFUSE -->
|
||||
</uniform>
|
||||
<depth>
|
||||
<function>lequal</function>
|
||||
<!-- <write-mask type="bool">false</write-mask> -->
|
||||
</depth>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
11
Compositor/Effects/runway-dds.eff
Normal file
11
Compositor/Effects/runway-dds.eff
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/runway-dds</name>
|
||||
<inherits-from>Effects/runway</inherits-from>
|
||||
<parameters>
|
||||
<texture n="4">
|
||||
<image>Textures/Runway/rwy-normalmap.dds</image>
|
||||
</texture>
|
||||
<normalmap_dds>1.0</normalmap_dds>
|
||||
</parameters>
|
||||
</PropertyList>
|
1565
Compositor/Effects/runway.eff
Normal file
1565
Compositor/Effects/runway.eff
Normal file
File diff suppressed because it is too large
Load diff
8
Compositor/Effects/schemes.xml
Normal file
8
Compositor/Effects/schemes.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PropertyList>
|
||||
<scheme>
|
||||
<name>als-shadow</name>
|
||||
<fallback>Effects/shadow-pass</fallback>
|
||||
</scheme>
|
||||
</PropertyList>
|
463
Compositor/Effects/skydome.eff
Normal file
463
Compositor/Effects/skydome.eff
Normal file
|
@ -0,0 +1,463 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/skydome</name>
|
||||
<parameters>
|
||||
<mie>
|
||||
<use>/sim/rendering/mie</use>
|
||||
</mie>
|
||||
<rayleigh>
|
||||
<use>/sim/rendering/rayleigh</use>
|
||||
</rayleigh>
|
||||
<density>
|
||||
<use>/sim/rendering/dome-density</use>
|
||||
</density>
|
||||
<overcast>
|
||||
<use>/rendering/scene/overcast</use>
|
||||
</overcast>
|
||||
<saturation>
|
||||
<use>/rendering/scene/saturation</use>
|
||||
</saturation>
|
||||
<scattering>
|
||||
<use>/rendering/scene/scattering</use>
|
||||
</scattering>
|
||||
<visibility>
|
||||
<use>/environment/ground-visibility-m</use>
|
||||
</visibility>
|
||||
<avisibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</avisibility>
|
||||
<ice_hex_col>
|
||||
<use>/environment/scattering-phenomena/ice-hexagonal-column-factor</use>
|
||||
</ice_hex_col>
|
||||
<ice_hex_sheet>
|
||||
<use>/environment/scattering-phenomena/ice-hexagonal-sheet-factor</use>
|
||||
</ice_hex_sheet>
|
||||
<parhelic>
|
||||
<use>/environment/scattering-phenomena/parhelic-factor</use>
|
||||
</parhelic>
|
||||
<ring>
|
||||
<use>/environment/scattering-phenomena/ring-factor</use>
|
||||
</ring>
|
||||
<aurora_strength>
|
||||
<use>/environment/aurora/strength</use>
|
||||
</aurora_strength>
|
||||
<aurora_vsize>
|
||||
<use>/environment/aurora/vsize</use>
|
||||
</aurora_vsize>
|
||||
<aurora_hsize>
|
||||
<use>/environment/aurora/hsize</use>
|
||||
</aurora_hsize>
|
||||
<aurora_ray_factor>
|
||||
<use>/environment/aurora/ray-factor</use>
|
||||
</aurora_ray_factor>
|
||||
<aurora_penetration_factor>
|
||||
<use>/environment/aurora/penetration-factor</use>
|
||||
</aurora_penetration_factor>
|
||||
<lthickness>
|
||||
<use>/environment/ground-haze-thickness-m</use>
|
||||
</lthickness>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<terrain_alt>
|
||||
<use>/environment/mean-terrain-elevation-m</use>
|
||||
</terrain_alt>
|
||||
<cloud_self_shading>
|
||||
<use>/environment/cloud-self-shading</use>
|
||||
</cloud_self_shading>
|
||||
<horizon_roughness>
|
||||
<use>/local-weather/config/small-scale-persistence</use>
|
||||
</horizon_roughness>
|
||||
<display_xsize>
|
||||
<use>/sim/startup/xsize</use>
|
||||
</display_xsize>
|
||||
<display_ysize>
|
||||
<use>/sim/startup/ysize</use>
|
||||
</display_ysize>
|
||||
<view_pitch_offset>
|
||||
<use>/sim/current-view/pitch-offset-deg</use>
|
||||
</view_pitch_offset>
|
||||
<view_heading_offset>
|
||||
<use>/sim/current-view/heading-offset-deg</use>
|
||||
</view_heading_offset>
|
||||
<view_fov>
|
||||
<use>/sim/current-view/field-of-view</use>
|
||||
</view_fov>
|
||||
<use_searchlight>
|
||||
<use>/sim/rendering/als-secondary-lights/use-searchlight</use>
|
||||
</use_searchlight>
|
||||
<use_landing_light>
|
||||
<use>/sim/rendering/als-secondary-lights/use-landing-light</use>
|
||||
</use_landing_light>
|
||||
<use_alt_landing_light>
|
||||
<use>/sim/rendering/als-secondary-lights/use-alt-landing-light</use>
|
||||
</use_alt_landing_light>
|
||||
<landing_light1_offset>
|
||||
<use>/sim/rendering/als-secondary-lights/landing-light1-offset-deg</use>
|
||||
</landing_light1_offset>
|
||||
<landing_light2_offset>
|
||||
<use>/sim/rendering/als-secondary-lights/landing-light2-offset-deg</use>
|
||||
</landing_light2_offset>
|
||||
<landing_light3_offset>
|
||||
<use>/sim/rendering/als-secondary-lights/landing-light3-offset-deg</use>
|
||||
</landing_light3_offset>
|
||||
<use_filtering>
|
||||
<use>/sim/rendering/als-filters/use-filtering</use>
|
||||
</use_filtering>
|
||||
<gamma>
|
||||
<use>/sim/rendering/als-filters/gamma</use>
|
||||
</gamma>
|
||||
<brightness>
|
||||
<use>/sim/rendering/als-filters/brightness</use>
|
||||
</brightness>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
<fact_grey>
|
||||
<use>/sim/rendering/als-filters/grey-factor</use>
|
||||
</fact_grey>
|
||||
<fact_black>
|
||||
<use>/sim/rendering/als-filters/black-factor</use>
|
||||
</fact_black>
|
||||
<delta_T>-50.0</delta_T>
|
||||
<air_pollution>
|
||||
<use>/environment/air-pollution-norm</use>
|
||||
</air_pollution>
|
||||
</parameters>
|
||||
<!-- fall back without shaders -->
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<lighting>false</lighting>
|
||||
<shade-model>smooth</shade-model>
|
||||
<cull-face>back</cull-face>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<shade-model>smooth</shade-model>
|
||||
<cull-face>back</cull-face>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/skydome.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/skydome.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>mK</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>mie</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rK</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rayleigh</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>density</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>density</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>saturation</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>saturation</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>visibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>visibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>hazeLayerAltitude</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lthickness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>avisibility</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>avisibility</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ice_hex_col</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ice_hex_col</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>parhelic</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>parhelic</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ring</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ring</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ice_hex_sheet</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ice_hex_sheet</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>aurora_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>aurora_strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>aurora_vsize</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>aurora_vsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>aurora_hsize</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>aurora_hsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>aurora_ray_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>aurora_ray_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>aurora_penetration_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>aurora_penetration_factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>horizon_roughness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>horizon_roughness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
961
Compositor/Effects/space-combined.eff
Normal file
961
Compositor/Effects/space-combined.eff
Normal file
|
@ -0,0 +1,961 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Altitude-dependent scattered light -->
|
||||
<PropertyList>
|
||||
<name>Effects/space-combined</name>
|
||||
<inherits-from>Effects/model-combined</inherits-from>
|
||||
<parameters>
|
||||
<geo_light_r type="float">0.0</geo_light_r>
|
||||
<geo_light_g type="float">0.0</geo_light_g>
|
||||
<geo_light_b type="float">0.0</geo_light_b>
|
||||
<geo_light_x type="float">0.0</geo_light_x>
|
||||
<geo_light_y type="float">0.0</geo_light_y>
|
||||
<geo_light_z type="float">0.0</geo_light_z>
|
||||
<geo_light_radius type="float">0.0</geo_light_radius>
|
||||
<geo_ambience type="float">0.0</geo_ambience>
|
||||
<use_geo_light type="int">0</use_geo_light>
|
||||
</parameters>
|
||||
<technique n="8">
|
||||
<pass>
|
||||
<program>
|
||||
<vertex-shader n="0">Shaders/ALS/space-ultra.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/ALS/space-ultra.frag</fragment-shader>
|
||||
<fragment-shader n="6">Shaders/ALS/color_temperature.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>BaseTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ReflNoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NormalTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>LightMapTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ReflMapTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">4</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>Environment</name>
|
||||
<type>sampler-cube</type>
|
||||
<value type="int">5</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ReflGradientsTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">6</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>GrainTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">7</value>
|
||||
</uniform>
|
||||
<!-- NORMAL MAP -->
|
||||
<!-- normalmap is used-->
|
||||
<uniform>
|
||||
<name>nmap_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>normalmap-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- normalmap is .dds-->
|
||||
<uniform>
|
||||
<name>nmap_dds</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>normalmap-dds</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>nmap_tile</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>normalmap-tiling</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- LIGHTMAP -->
|
||||
<!-- lightmap is used -->
|
||||
<uniform>
|
||||
<name>lightmap_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>lightmap-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- lightmap is multichannel -->
|
||||
<uniform>
|
||||
<name>lightmap_multi</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>lightmap-multi</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_r_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_g_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_b_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>lightmap-factor[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>lightmap_a_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>lightmap-color[3]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>darkmap_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>darkmap-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- reflection is used -->
|
||||
<uniform>
|
||||
<name>refl_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>reflection-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- reflection correction -->
|
||||
<uniform>
|
||||
<name>refl_correction</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>reflection-correction</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- use a reflection map-->
|
||||
<uniform>
|
||||
<name>refl_map</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>reflect-map-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- how are colors merged in a reflection-->
|
||||
<uniform>
|
||||
<name>refl_type</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>reflection-type</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- reflection is dynamic -->
|
||||
<uniform>
|
||||
<name>refl_dynamic</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>reflection-dynamic</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- set the amount of fringing colour 0.0 - 1.0 -->
|
||||
<uniform>
|
||||
<name>refl_rainbow</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>reflection-rainbow</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- set the amount of fresnel effect colour 0.0 - 1.0 -->
|
||||
<uniform>
|
||||
<name>refl_fresnel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>reflection-fresnel</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- set the amount of noisiness 0.0 - 1.0 -->
|
||||
<uniform>
|
||||
<name>refl_noise</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>reflection-noise</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- dirt -->
|
||||
<uniform>
|
||||
<name>dirt_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>dirt-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_multi</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>dirt-multi</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_r_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>dirt-color[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_r_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dirt-factor[0]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_g_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>dirt-color[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_g_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dirt-factor[1]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_b_color</name>
|
||||
<type>float-vec3</type>
|
||||
<value>
|
||||
<use>dirt-color[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_b_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dirt-factor[2]</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_modulates_reflection</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>dirt-modulates-reflection</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>dirt_reflection_factor</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>dirt-reflection-factor</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- use a grain texture map-->
|
||||
<uniform>
|
||||
<name>grain_texture_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>grain-texture-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>grain_magnification</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>grain-magnification</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- simulate wetness and rain-->
|
||||
<uniform>
|
||||
<name>rain_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>rain-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
|
||||
<uniform>
|
||||
<name>amb_correction</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ambient-correction</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>hdg</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>model-hdg</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>pitch</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>model-pitch</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>roll</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>model-roll</use>
|
||||
</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>ground_scattering</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>ground_scattering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terrain_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terrain_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overcast</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>overcast</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud_self_shading</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>moonlight</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>moonlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>air_pollution</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>air_pollution</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>rain_norm</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rnorm</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>wetness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>wetness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_pitch_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_pitch_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>view_heading_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_heading_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>field_of_view</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>view_fov</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light1_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light1_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light2_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light2_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>landing_light3_offset</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>landing_light3_offset</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>gamma</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>brightness</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_filtering</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>delta_T</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>delta_T</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_grey</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>fact_black</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos1_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos1_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos1_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos2_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos3_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos4_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos5_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos6_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos7_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos8_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos9_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos10_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos11_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos12_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos13_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos14_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos15_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos16_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos17_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos18_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos19_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloudpos20_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_shadow_flag</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>cloud_shadow_flag</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_searchlight</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_searchlight</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_alt_landing_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_alt_landing_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_xsize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_ysize</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>display_ysize</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>darkmap_enabled</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>darkmap-enabled</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_x</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_x</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_y</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_y</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_z</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_z</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_light_radius</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_light_radius</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>geo_ambience</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>geo_ambience</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_geo_light</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_geo_light</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<program>
|
||||
<vertex-shader n="0">Shaders/ALS/space-base.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/ALS/space-base.frag</fragment-shader>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
14
Compositor/Effects/space.eff
Normal file
14
Compositor/Effects/space.eff
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Altitude-dependent scattered light -->
|
||||
<PropertyList>
|
||||
<name>Effects/space</name>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<program>
|
||||
<vertex-shader n="0">Shaders/ALS/space-base.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/ALS/space-base.frag</fragment-shader>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
365
Compositor/Effects/surface-lights-directional.eff
Normal file
365
Compositor/Effects/surface-lights-directional.eff
Normal file
|
@ -0,0 +1,365 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/surface-lights-directional</name>
|
||||
<parameters>
|
||||
<!-- min-size, max-size, size, attenuation, cull-face parameters filled in by C++ code -->
|
||||
<texture n="0">
|
||||
<type>light-sprite</type>
|
||||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
</texture>
|
||||
<visibility>
|
||||
<use>/environment/ground-visibility-m</use>
|
||||
</visibility>
|
||||
<avisibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</avisibility>
|
||||
<lthickness>
|
||||
<use>/environment/ground-haze-thickness-m</use>
|
||||
</lthickness>
|
||||
<eye_alt>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</eye_alt>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
</parameters>
|
||||
<technique n="6">
|
||||
<!-- Combined technique -->
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/point-sprites</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<and>
|
||||
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
||||
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
||||
</and>
|
||||
</or>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<alpha-test>
|
||||
<comparison>gequal</comparison>
|
||||
<reference type="float">0.1</reference>
|
||||
</alpha-test>
|
||||
<cull-face>back</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
<point>
|
||||
<min-size>
|
||||
<use>min-size</use>
|
||||
</min-size>
|
||||
<max-size>
|
||||
<use>max-size</use>
|
||||
</max-size>
|
||||
<size>
|
||||
<use>size</use>
|
||||
</size>
|
||||
<attenuation>
|
||||
<use>attenuation</use>
|
||||
</attenuation>
|
||||
</point>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<point-sprite>true</point-sprite>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<wrap-s>
|
||||
<use>texture[0]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[0]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="7">
|
||||
<!-- Sprite technique -->
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/point-sprites</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
||||
</or>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<cull-face>back</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<point-sprite>true</point-sprite>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<wrap-s>
|
||||
<use>texture[0]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[0]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="8">
|
||||
<!-- Attenuation technique -->
|
||||
<predicate>
|
||||
<and>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
||||
</or>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass>
|
||||
<point>
|
||||
<min-size>
|
||||
<use>min-size</use>
|
||||
</min-size>
|
||||
<max-size>
|
||||
<use>max-size</use>
|
||||
</max-size>
|
||||
<size>
|
||||
<use>size</use>
|
||||
</size>
|
||||
<attenuation>
|
||||
<use>attenuation</use>
|
||||
</attenuation>
|
||||
</point>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<lighting>false</lighting>
|
||||
<cull-face>back</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<!-- Basic technique -->
|
||||
<pass>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<cull-face>back</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<!-- ALS -->
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/point-sprites</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<and>
|
||||
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
||||
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<!--<alpha-test>
|
||||
<comparison>gequal</comparison>
|
||||
<reference type="float">0.03</reference>
|
||||
</alpha-test>-->
|
||||
<cull-face>back</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
<point>
|
||||
<min-size>
|
||||
<use>min-size</use>
|
||||
</min-size>
|
||||
<max-size>
|
||||
<use>max-size</use>
|
||||
</max-size>
|
||||
<size>
|
||||
<use>size</use>
|
||||
</size>
|
||||
<attenuation>
|
||||
<use>attenuation</use>
|
||||
</attenuation>
|
||||
</point>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<point-sprite>true</point-sprite>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<wrap-s>
|
||||
<use>texture[0]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[0]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/surface-light.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/surface-light.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>size</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>size</use>
|
||||
</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>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>max_size</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>max-size</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>is_directional</name>
|
||||
<type>bool</type>
|
||||
<!-- Short-term fix for unstable normals in taxiway lights -->
|
||||
<value>false</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-point-size>true</vertex-program-point-size>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
376
Compositor/Effects/surface-lights.eff
Normal file
376
Compositor/Effects/surface-lights.eff
Normal file
|
@ -0,0 +1,376 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/surface-lights</name>
|
||||
<parameters>
|
||||
<!-- min-size, max-size, size, attenuation, cull-face parameters filled in by C++ code -->
|
||||
<texture n="0">
|
||||
<type>light-sprite</type>
|
||||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
</texture>
|
||||
<visibility>
|
||||
<use>/environment/ground-visibility-m</use>
|
||||
</visibility>
|
||||
<avisibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</avisibility>
|
||||
<lthickness>
|
||||
<use>/environment/ground-haze-thickness-m</use>
|
||||
</lthickness>
|
||||
<eye_alt>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</eye_alt>
|
||||
<terminator>
|
||||
<use>/environment/terminator-relative-position-m</use>
|
||||
</terminator>
|
||||
<use_night_vision>
|
||||
<use>/sim/rendering/als-filters/use-night-vision</use>
|
||||
</use_night_vision>
|
||||
<use_IR_vision>
|
||||
<use>/sim/rendering/als-filters/use-IR-vision</use>
|
||||
</use_IR_vision>
|
||||
</parameters>
|
||||
<technique n="6">
|
||||
<!-- Combined technique -->
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/point-sprites</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<and>
|
||||
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
||||
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
||||
</and>
|
||||
</or>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<alpha-test>
|
||||
<comparison>gequal</comparison>
|
||||
<reference type="float">0.1</reference>
|
||||
</alpha-test>
|
||||
<cull-face>back</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
<point>
|
||||
<min-size>
|
||||
<use>min-size</use>
|
||||
</min-size>
|
||||
<max-size>
|
||||
<use>max-size</use>
|
||||
</max-size>
|
||||
<size>
|
||||
<use>size</use>
|
||||
</size>
|
||||
<attenuation>
|
||||
<use>attenuation</use>
|
||||
</attenuation>
|
||||
</point>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<point-sprite>true</point-sprite>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<wrap-s>
|
||||
<use>texture[0]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[0]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="7">
|
||||
<!-- Sprite technique -->
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/point-sprites</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
||||
</or>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<cull-face>
|
||||
<use>cull-face</use>
|
||||
</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<point-sprite>true</point-sprite>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<wrap-s>
|
||||
<use>texture[0]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[0]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="8">
|
||||
<!-- Attenuation technique -->
|
||||
<predicate>
|
||||
<and>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
||||
</or>
|
||||
</and>
|
||||
</predicate>
|
||||
<pass>
|
||||
<point>
|
||||
<min-size>
|
||||
<use>min-size</use>
|
||||
</min-size>
|
||||
<max-size>
|
||||
<use>max-size</use>
|
||||
</max-size>
|
||||
<size>
|
||||
<use>size</use>
|
||||
</size>
|
||||
<attenuation>
|
||||
<use>attenuation</use>
|
||||
</attenuation>
|
||||
</point>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<lighting>false</lighting>
|
||||
<cull-face>
|
||||
<use>cull-face</use>
|
||||
</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
<back>point</back>
|
||||
</polygon-mode>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="9">
|
||||
<!-- Basic technique -->
|
||||
<pass>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<cull-face>
|
||||
<use>cull-face</use>
|
||||
</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
</polygon-mode>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<!-- ALS -->
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/point-sprites</property>
|
||||
<or>
|
||||
<less-equal>
|
||||
<value type="float">2.0</value>
|
||||
<glversion/>
|
||||
</less-equal>
|
||||
<and>
|
||||
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
||||
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>8</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<lighting>false</lighting>
|
||||
<blend>
|
||||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<!--<alpha-test>
|
||||
<comparison>gequal</comparison>
|
||||
<reference type="float">0.03</reference>
|
||||
</alpha-test>-->
|
||||
<cull-face>
|
||||
<use>cull-face</use>
|
||||
</cull-face>
|
||||
<polygon-mode>
|
||||
<front>point</front>
|
||||
<back>point</back>
|
||||
</polygon-mode>
|
||||
<point>
|
||||
<min-size>
|
||||
<use>min-size</use>
|
||||
</min-size>
|
||||
<max-size>
|
||||
<use>max-size</use>
|
||||
</max-size>
|
||||
<size>
|
||||
<use>size</use>
|
||||
</size>
|
||||
<attenuation>
|
||||
<use>attenuation</use>
|
||||
</attenuation>
|
||||
</point>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<point-sprite>true</point-sprite>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<wrap-s>
|
||||
<use>texture[0]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[0]/wrap-t</use>
|
||||
</wrap-t>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/surface-light.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/surface-light.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>size</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>size</use>
|
||||
</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>eye_alt</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>eye_alt</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>max_size</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>max-size</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>is_directional</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>light-directional</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_night_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_night_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_IR_vision</name>
|
||||
<type>bool</type>
|
||||
<value>
|
||||
<use>use_IR_vision</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>terminator</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>terminator</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<vertex-program-point-size>true</vertex-program-point-size>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
2235
Compositor/Effects/terrain-default.eff
Normal file
2235
Compositor/Effects/terrain-default.eff
Normal file
File diff suppressed because it is too large
Load diff
1285
Compositor/Effects/terrain-overlay.eff
Normal file
1285
Compositor/Effects/terrain-overlay.eff
Normal file
File diff suppressed because it is too large
Load diff
300
Compositor/Effects/thrust-flame.eff
Normal file
300
Compositor/Effects/thrust-flame.eff
Normal file
|
@ -0,0 +1,300 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/thrust-flame</name>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<type>white</type>
|
||||
</texture>
|
||||
<flame_radius_fraction type="float">0.2</flame_radius_fraction>
|
||||
<thrust_collimation type="float">0.1</thrust_collimation>
|
||||
<thrust_density type="float">0.5</thrust_density>
|
||||
<base_flame_density type="float">1.0</base_flame_density>
|
||||
<shock_frequency type="float">0.5</shock_frequency>
|
||||
<noise_strength type="float">0.2</noise_strength>
|
||||
<noise_scale type="float">0.1</noise_scale>
|
||||
<flame_color_low_r type="float">0.95</flame_color_low_r>
|
||||
<flame_color_low_g type="float">0.55</flame_color_low_g>
|
||||
<flame_color_low_b type="float">0.0</flame_color_low_b>
|
||||
<flame_color_high_r type="float">1.0</flame_color_high_r>
|
||||
<flame_color_high_g type="float">0.8</flame_color_high_g>
|
||||
<flame_color_high_b type="float">0.3</flame_color_high_b>
|
||||
<base_flame_r type="float">1.0</base_flame_r>
|
||||
<base_flame_g type="float">0.8</base_flame_g>
|
||||
<base_flame_b type="float">0.3</base_flame_b>
|
||||
<random_seed type="float">0.0</random_seed>
|
||||
<deflection_coeff type="float">0.0</deflection_coeff>
|
||||
<use_shocks type="int">1</use_shocks>
|
||||
<use_noise type="int">1</use_noise>
|
||||
<visibility>
|
||||
<use>/environment/ground-visibility-m</use>
|
||||
</visibility>
|
||||
<avisibility>
|
||||
<use>/environment/visibility-m</use>
|
||||
</avisibility>
|
||||
<lthickness>
|
||||
<use>/environment/ground-haze-thickness-m</use>
|
||||
</lthickness>
|
||||
<terrain_alt>
|
||||
<use>/environment/mean-terrain-elevation-m</use>
|
||||
</terrain_alt>
|
||||
<eye_alt>
|
||||
<use>/sim/rendering/eye-altitude-m</use>
|
||||
</eye_alt>
|
||||
</parameters>
|
||||
<technique n="19">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<and>
|
||||
<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>
|
||||
<emissive>
|
||||
<use>material/emissive</use>
|
||||
</emissive>
|
||||
<shininess>
|
||||
<use>material/shininess</use>
|
||||
</shininess>
|
||||
<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>
|
||||
<render-bin>
|
||||
<bin-number>111</bin-number>
|
||||
<bin-name>DepthSortedBin</bin-name>
|
||||
</render-bin>
|
||||
<texture-unit>
|
||||
<!-- The texture unit is always active because the shaders expect
|
||||
that. -->
|
||||
<unit>0</unit>
|
||||
<active>
|
||||
<use>texture[0]/active</use>
|
||||
</active>
|
||||
<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>
|
||||
<depth>
|
||||
<write-mask>false</write-mask>
|
||||
</depth>
|
||||
<vertex-program-two-side>false</vertex-program-two-side>
|
||||
<program>
|
||||
<vertex-shader>Shaders/ALS/thrustflame.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/ALS/thrustflame.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>flame_radius_fraction</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flame_radius_fraction</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>thrust_collimation</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>thrust_collimation</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>thrust_density</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>thrust_density</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>base_flame_density</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>base_flame_density</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>shock_frequency</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>shock_frequency</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>noise_strength</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>noise_strength</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>noise_scale</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>noise_scale</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>random_seed</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>random_seed</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flame_color_low_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flame_color_low_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flame_color_low_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flame_color_low_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flame_color_low_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flame_color_low_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flame_color_high_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flame_color_high_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flame_color_high_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flame_color_high_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>flame_color_high_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>flame_color_high_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>base_flame_r</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>base_flame_r</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>base_flame_g</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>base_flame_g</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>base_flame_b</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>base_flame_b</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>deflection_coeff</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>deflection_coeff</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_shocks</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_shocks</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_noise</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>use_noise</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>
|
||||
<use>material/color-mode-uniform</use>
|
||||
</value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
17
Compositor/Effects/transition-base-dirt.eff
Normal file
17
Compositor/Effects/transition-base-dirt.eff
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/transition-base-dirt</name>
|
||||
<inherits-from>Effects/transition</inherits-from>
|
||||
<parameters>
|
||||
<texture n="3">
|
||||
<image>Textures/Terrain/dirt3.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<transitions type="float">1.0</transitions>
|
||||
<inverse type="float">0.0</inverse>
|
||||
</parameters>
|
||||
</PropertyList>
|
17
Compositor/Effects/transition-base-grass-inverse.eff
Normal file
17
Compositor/Effects/transition-base-grass-inverse.eff
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/transition-base-rock</name>
|
||||
<inherits-from>Effects/transition</inherits-from>
|
||||
<parameters>
|
||||
<texture n="3">
|
||||
<image>Textures/Terrain/herbtundra.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<transitions type="float">1.0</transitions>
|
||||
<inverse type="float">1.0</inverse>
|
||||
</parameters>
|
||||
</PropertyList>
|
33
Compositor/Effects/transition-base-grass-rock.eff
Normal file
33
Compositor/Effects/transition-base-grass-rock.eff
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/transition-base-grass-rock</name>
|
||||
<inherits-from>Effects/transition</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/grass10c.dds</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/rock7.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="4">
|
||||
<image>Textures/Terrain.winter/mixedforest1c.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<transitions type="float">2.0</transitions>
|
||||
<inverse type="float">0.0</inverse>
|
||||
</parameters>
|
||||
</PropertyList>
|
17
Compositor/Effects/transition-base-rock.eff
Normal file
17
Compositor/Effects/transition-base-rock.eff
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/transition-base-rock</name>
|
||||
<inherits-from>Effects/transition</inherits-from>
|
||||
<parameters>
|
||||
<texture n="3">
|
||||
<image>Textures/Terrain/rock7.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<transitions type="float">1.0</transitions>
|
||||
<inverse type="float">0.0</inverse>
|
||||
</parameters>
|
||||
</PropertyList>
|
373
Compositor/Effects/transition.eff
Normal file
373
Compositor/Effects/transition.eff
Normal file
|
@ -0,0 +1,373 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Transition effect starting from the base texture of the scenery, and changing textures according to slope in one or two steps.
|
||||
|
||||
parameters :
|
||||
texture[0] -> base texture from the scenery
|
||||
texture[2] -> intermediate texture if transitions is set to 2
|
||||
texture[3] -> texture you want to transition to
|
||||
texture[4] -> snow texture you want applied above snow-limit (I recommend using the corespondent winter texture for the base texture that you can find in terrain.winter)
|
||||
|
||||
transitions -> transitions number can be set to 1 or 2 (if set to 2 will allow for an intermediate step)
|
||||
inverse -> if this is set to 1 will keep the base texture on steep slopes and transition to the texture you want (useful to add some grass patches in rocky areas)
|
||||
-->
|
||||
<PropertyList>
|
||||
<name>Effects/transition</name>
|
||||
<inherits-from>Effects/terrain-default</inherits-from>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Textures/Terrain/transition1.dds</image>
|
||||
<type>2d</type>
|
||||
<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/Terrain/transition2.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="4">
|
||||
<image>Textures/Terrain/snow3.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<rain-norm>
|
||||
<use>/environment/rain-norm</use>
|
||||
</rain-norm>
|
||||
<snow-level>
|
||||
<use>/environment/snow-level-m</use>
|
||||
</snow-level>
|
||||
<cloud-cover0>
|
||||
<use>/environment/clouds/layer[0]/coverage-type</use>
|
||||
</cloud-cover0>
|
||||
<cloud-cover1>
|
||||
<use>/environment/clouds/layer[1]/coverage-type</use>
|
||||
</cloud-cover1>
|
||||
<cloud-cover2>
|
||||
<use>/environment/clouds/layer[2]/coverage-type</use>
|
||||
</cloud-cover2>
|
||||
<cloud-cover3>
|
||||
<use>/environment/clouds/layer[3]/coverage-type</use>
|
||||
</cloud-cover3>
|
||||
<cloud-cover4>
|
||||
<use>/environment/clouds/layer[4]/coverage-type</use>
|
||||
</cloud-cover4>
|
||||
<transitions type="float">2.0</transitions>
|
||||
<inverse type="float">0.0</inverse>
|
||||
<!-- 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>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
<!--<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
<binormal type="int">7</binormal>
|
||||
</generate>-->
|
||||
<technique n="9">
|
||||
<predicate>
|
||||
<and>
|
||||
<property>/sim/rendering/shaders/quality-level</property>
|
||||
<property>/sim/rendering/shaders/transition</property>
|
||||
<equal>
|
||||
<value type="float">0.0</value>
|
||||
<float-property>/sim/rendering/rembrandt/enabled</float-property>
|
||||
</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>
|
||||
<!-- Use material values that are either inherited from the
|
||||
terrain-default effect or supplied by an effect derived
|
||||
from this one e.g., one created in the materials library. -->
|
||||
<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>
|
||||
<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>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<type>
|
||||
<use>texture[2]/type</use>
|
||||
</type>
|
||||
<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>2</unit>
|
||||
<type>
|
||||
<use>texture[3]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
<texture-unit>
|
||||
<unit>3</unit>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<image>
|
||||
<use>texture[4]/image</use>
|
||||
</image>
|
||||
<filter>
|
||||
<use>texture[4]/filter</use>
|
||||
</filter>
|
||||
<wrap-s>
|
||||
<use>texture[4]/wrap-s</use>
|
||||
</wrap-s>
|
||||
<wrap-t>
|
||||
<use>texture[4]/wrap-t</use>
|
||||
</wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[4]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>4</unit>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<program>
|
||||
<!-- <vertex-shader>Shaders/Default/include_fog.vert</vertex-shader> -->
|
||||
<vertex-shader n="1">Shaders/Default/transition.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/Default/transition.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>BaseTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SecondTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>ThirdTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">2</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SnowTex</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">3</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>NoiseTex</name>
|
||||
<type>sampler-3d</type>
|
||||
<value type="int">4</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>RainNorm</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>rain-norm</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>SnowLevel</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>snow-level</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>Transitions</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>transitions</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>InverseSlope</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>inverse</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>CloudCover0</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud-cover0</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>CloudCover1</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud-cover1</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>CloudCover2</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud-cover2</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>CloudCover3</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud-cover3</use>
|
||||
</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>CloudCover4</name>
|
||||
<type>float</type>
|
||||
<value>
|
||||
<use>cloud-cover4</use>
|
||||
</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>
|
||||
</technique>
|
||||
</PropertyList>
|
8
Compositor/Effects/tree-european-deciduous.eff
Normal file
8
Compositor/Effects/tree-european-deciduous.eff
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/tree-european-deciduous</name>
|
||||
<inherits-from>Effects/tree</inherits-from>
|
||||
<parameters>
|
||||
<num_deciduous_trees>8</num_deciduous_trees>
|
||||
</parameters>
|
||||
</PropertyList>
|
8
Compositor/Effects/tree-european-mixed.eff
Normal file
8
Compositor/Effects/tree-european-mixed.eff
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/tree-european-mixed</name>
|
||||
<inherits-from>Effects/tree</inherits-from>
|
||||
<parameters>
|
||||
<num_deciduous_trees>4</num_deciduous_trees>
|
||||
</parameters>
|
||||
</PropertyList>
|
10
Compositor/Effects/tree-forest.eff
Normal file
10
Compositor/Effects/tree-forest.eff
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/tree-forest</name>
|
||||
<inherits-from>Effects/tree</inherits-from>
|
||||
<parameters>
|
||||
<use_tree_shadows>true</use_tree_shadows>
|
||||
<use_forest_effect>true</use_forest_effect>
|
||||
<tree_patches>true</tree_patches>
|
||||
</parameters>
|
||||
</PropertyList>
|
9
Compositor/Effects/tree-grass.eff
Normal file
9
Compositor/Effects/tree-grass.eff
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/tree-grass</name>
|
||||
<inherits-from>Effects/tree</inherits-from>
|
||||
<parameters>
|
||||
<use_tree_shadows>false</use_tree_shadows>
|
||||
<use_forest_effect>false</use_forest_effect>
|
||||
</parameters>
|
||||
</PropertyList>
|
2558
Compositor/Effects/tree.eff
Normal file
2558
Compositor/Effects/tree.eff
Normal file
File diff suppressed because it is too large
Load diff
2191
Compositor/Effects/urban.eff
Normal file
2191
Compositor/Effects/urban.eff
Normal file
File diff suppressed because it is too large
Load diff
56
Compositor/Effects/water-dds.eff
Normal file
56
Compositor/Effects/water-dds.eff
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<name>Effects/water-dds</name>
|
||||
<inherits-from>Effects/water</inherits-from>
|
||||
<parameters>
|
||||
<texture n="0">
|
||||
<image>Textures/Water/water-reflection.dds</image>
|
||||
<type>2d</type>
|
||||
<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/waves-ver10-nm.dds</image>
|
||||
<type>2d</type>
|
||||
<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_sine_nmap.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="4">
|
||||
<image>Textures/Water/water-reflection-grey.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="5">
|
||||
<image>Textures/Water/sea_foam.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="6">
|
||||
<image>Textures/Water/perlin-noise-nm.dds</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<normalmap_dds type="float">1.0</normalmap_dds>
|
||||
</parameters>
|
||||
</PropertyList>
|
2063
Compositor/Effects/water-inland.eff
Normal file
2063
Compositor/Effects/water-inland.eff
Normal file
File diff suppressed because it is too large
Load diff
2504
Compositor/Effects/water.eff
Normal file
2504
Compositor/Effects/water.eff
Normal file
File diff suppressed because it is too large
Load diff
84
Compositor/Shaders/ALS/3dcloud-detailed.frag
Normal file
84
Compositor/Shaders/ALS/3dcloud-detailed.frag
Normal file
|
@ -0,0 +1,84 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
uniform float scattering;
|
||||
|
||||
varying float fogFactor;
|
||||
varying float mie_frag;
|
||||
varying float mie_frag_mod;
|
||||
varying float z_pos;
|
||||
varying float bottom_shade;
|
||||
|
||||
varying vec3 internal_pos;
|
||||
varying vec3 hazeColor;
|
||||
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
||||
if (base.a < 0.02)
|
||||
discard;
|
||||
|
||||
float mie_factor = 0.0;
|
||||
float geo_factor = 1.0;
|
||||
|
||||
float mie_sign = 1.0;
|
||||
if (mie_frag < 0.0) {mie_sign = -1.0;}
|
||||
|
||||
if (mie_sign > 0.0)
|
||||
{mie_factor = smoothstep(0.8, 1.0, mie_frag);}
|
||||
else
|
||||
{mie_factor = -1.0 * (1.0 - smoothstep(-1.0, -0.8, mie_frag));}
|
||||
|
||||
mie_factor *= mie_frag_mod;
|
||||
|
||||
// suppress effect in cloud center
|
||||
|
||||
float z_bias = 0.2 * (1.0 - smoothstep(2.0, 3.0, z_pos));
|
||||
|
||||
geo_factor *= smoothstep(-0.9 - z_bias, -0.4 - z_bias, internal_pos.x) * (1.0 -smoothstep(0.4 + z_bias, 0.9 + z_bias, internal_pos.x));
|
||||
geo_factor *= smoothstep(-0.9 - z_bias, -0.4 - z_bias, internal_pos.y) * (1.0 -smoothstep(0.4 + z_bias, 0.9 + z_bias, internal_pos.y));
|
||||
geo_factor *= smoothstep(0, 0.3, internal_pos.z) * (1.0 - smoothstep(0.5, 1.2, internal_pos.z));
|
||||
|
||||
if (mie_sign > 0.0)
|
||||
{
|
||||
mie_factor *=(1.0 -geo_factor);
|
||||
}
|
||||
|
||||
float transparency = smoothstep(0.0, 0.7, base.a);
|
||||
float opacity = smoothstep(0.7, 1.0, base.a);
|
||||
|
||||
float inverse_mie = 0.0;
|
||||
|
||||
if ((opacity == 0.0) && (mie_sign > 0.0)) // Mie forward scattering enhancing light
|
||||
{mie_factor *= (1.0 - pow(transparency, 2.0));}
|
||||
else if ((opacity == 0.0) && (mie_sign < 0.0)) // Mie forward scattering reducing reflected light
|
||||
{
|
||||
inverse_mie = (1.0 - pow(transparency, 2.0)) * smoothstep(0.65, 0.8, scattering);
|
||||
inverse_mie *= (1.0 - smoothstep(-1.0, -0.5, mie_frag));
|
||||
}
|
||||
else if (mie_sign > 0.0) // bulk light absorption
|
||||
{mie_factor *= - 4.0 * pow(opacity, 2.0);}
|
||||
|
||||
|
||||
// darken the bulk of the away-facing cloud
|
||||
|
||||
float bulk_shade_factor = (1.0 - 0.6 * geo_factor * smoothstep(0.5, 1.0, mie_frag));
|
||||
bulk_shade_factor -= 0.3 * smoothstep(0.5, 1.0, mie_frag) * (1.0 - mie_frag_mod) * (1.0 - smoothstep(0.4, 0.5, bottom_shade));
|
||||
|
||||
|
||||
float mie_enhancement = 1.0 + clamp(mie_factor, 0.0, 1.0);
|
||||
mie_enhancement = mie_enhancement * bulk_shade_factor;
|
||||
|
||||
vec4 finalColor = base * gl_Color;
|
||||
finalColor.rgb *= mie_enhancement * (1.0 - 0.4 * inverse_mie);
|
||||
finalColor.rgb = max(finalColor.rgb, gl_Color.rgb * 1.2 * bottom_shade);
|
||||
|
||||
finalColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor );
|
||||
finalColor.rgb = filter_combined(finalColor.rgb);
|
||||
|
||||
|
||||
gl_FragColor.rgb = finalColor.rgb;
|
||||
gl_FragColor.a = mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor));
|
||||
}
|
293
Compositor/Shaders/ALS/3dcloud-detailed.vert
Normal file
293
Compositor/Shaders/ALS/3dcloud-detailed.vert
Normal file
|
@ -0,0 +1,293 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
varying float fogFactor;
|
||||
varying vec3 hazeColor;
|
||||
varying float mie_frag;
|
||||
varying float mie_frag_mod;
|
||||
varying vec3 internal_pos;
|
||||
varying float bottom_shade;
|
||||
varying float z_pos;
|
||||
|
||||
uniform float range; // From /sim/rendering/clouds3d-vis-range
|
||||
uniform float detail_range; // From /sim/rendering/clouds3d_detail-range
|
||||
uniform float scattering;
|
||||
uniform float terminator;
|
||||
uniform float altitude;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float visibility;
|
||||
uniform float moonlight;
|
||||
uniform float air_pollution;
|
||||
uniform float flash;
|
||||
uniform float lightning_pos_x;
|
||||
uniform float lightning_pos_y;
|
||||
uniform float lightning_range;
|
||||
|
||||
attribute vec3 usrAttr1;
|
||||
attribute vec3 usrAttr2;
|
||||
|
||||
float alpha_factor = usrAttr1.r;
|
||||
float shade_factor = usrAttr1.g;
|
||||
float cloud_height = usrAttr1.b;
|
||||
float bottom_factor = usrAttr2.r;
|
||||
float middle_factor = usrAttr2.g;
|
||||
float top_factor = usrAttr2.b;
|
||||
|
||||
const float EarthRadius = 5800000.0;
|
||||
|
||||
// light_func is a generalized logistic function fit to the light intensity as a function
|
||||
// of scaled terminator position obtained from Flightgear core
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
x = x-0.5;
|
||||
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x > 30.0) {return e;}
|
||||
if (x < -15.0) {return 0.03;}
|
||||
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
|
||||
float mie_func (in float x, in float Mie)
|
||||
{
|
||||
return x + 2.0 * x * Mie * (1.0 -0.8*x) * (1.0 -0.8*x);
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
|
||||
//shade_factor = shade_factor * cloud_self_shading;
|
||||
//top_factor = top_factor * cloud_self_shading;
|
||||
//shade_factor = min(shade_factor, top_factor);
|
||||
//middle_factor = min(middle_factor, top_factor);
|
||||
//bottom_factor = min(bottom_factor, top_factor);
|
||||
|
||||
float intensity;
|
||||
float mix_factor;
|
||||
|
||||
bottom_shade = bottom_factor;
|
||||
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight * scattering;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
||||
vec3 u = normalize(ep.xyz - l.xyz);
|
||||
|
||||
// Find a rotation matrix that rotates 1,0,0 into u. u, r and w are
|
||||
// the columns of that matrix.
|
||||
vec3 absu = abs(u);
|
||||
vec3 r = normalize(vec3(-u.y, u.x, 0.0));
|
||||
vec3 w = cross(u, r);
|
||||
|
||||
// Do the matrix multiplication by [ u r w pos]. Assume no
|
||||
// scaling in the homogeneous component of pos.
|
||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
gl_Position.xyz = gl_Vertex.x * u;
|
||||
gl_Position.xyz += gl_Vertex.y * r;
|
||||
gl_Position.xyz += gl_Vertex.z * w;
|
||||
// Apply Z scaling to allow sprites to be squashed in the z-axis
|
||||
gl_Position.z = gl_Position.z * gl_Color.w;
|
||||
|
||||
// Now shift the sprite to the correct position in the cloud.
|
||||
gl_Position.xyz += gl_Color.xyz;
|
||||
|
||||
internal_pos = gl_Position.xyz/ cloud_height;
|
||||
|
||||
|
||||
// Determine a lighting normal based on the vertex position from the
|
||||
// center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
|
||||
float n = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
normalize(vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z, 0.0))));
|
||||
|
||||
// prepare suppression of shadeward Mie terms
|
||||
float n1 = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
normalize(vec3(gl_ModelViewMatrix * vec4(- gl_Color.x, - gl_Color.y, - gl_Color.z, 0.0))));
|
||||
|
||||
//z_pos = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
// vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z, 0.0)))/cloud_height;
|
||||
|
||||
|
||||
float mie_suppress = smoothstep(0.0, 0.3, n1);
|
||||
|
||||
// Determine the position - used for fog and shading calculations
|
||||
float fogCoord = length(vec3(gl_ModelViewMatrix * vec4(gl_Color.x, gl_Color.y, gl_Color.z, 1.0)));
|
||||
float center_dist = length(vec3(gl_ModelViewMatrix * vec4(0.0,0.0,0.0,1.0)));
|
||||
|
||||
z_pos = (fogCoord - center_dist)/cloud_height;
|
||||
|
||||
if ((fogCoord > detail_range) && (fogCoord > center_dist) && (shade_factor < 0.7)) {
|
||||
// More than detail_range away, so discard all sprites on opposite side of
|
||||
// cloud center by shifting them beyond the view fustrum
|
||||
gl_Position = vec4(0.0,0.0,10.0,1.0);
|
||||
gl_FrontColor.a = 0.0;
|
||||
} else {
|
||||
|
||||
// Determine the shading of the vertex. We shade it based on it's position
|
||||
// in the cloud relative to the sun, and it's vertical position in the cloud.
|
||||
float shade = mix(shade_factor, top_factor, smoothstep(-0.3, 0.3, n));
|
||||
//if (n < 0) {
|
||||
// shade = mix(top_factor, shade_factor, abs(n));
|
||||
//}
|
||||
|
||||
if (gl_Position.z < 0.5 * cloud_height) {
|
||||
shade = min(shade, mix(bottom_factor, middle_factor, gl_Position.z * 2.0 / cloud_height));
|
||||
} else {
|
||||
shade = min(shade, mix(middle_factor, top_factor, gl_Position.z * 2.0 / cloud_height - 1.0));
|
||||
}
|
||||
|
||||
//float h = gl_Position.z / cloud_height;
|
||||
//if (h < 0.5) {
|
||||
// shade = min(shade, mix(bottom_factor, middle_factor, smoothstep(0.0, 0.5, h)));
|
||||
//} else {
|
||||
// shade = min(shade, mix(middle_factor, top_factor, smoothstep(2.0 * (h - 0.5)));
|
||||
// }
|
||||
|
||||
// Final position of the sprite
|
||||
vec3 relVector = gl_Position.xyz - ep.xyz;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
|
||||
|
||||
|
||||
// Light at the final position
|
||||
|
||||
// first obtain normal to sun position
|
||||
|
||||
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
|
||||
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
|
||||
|
||||
|
||||
|
||||
// yprime is the distance of the vertex into sun direction, corrected for altitude
|
||||
// the altitude correction is clamped to reasonable values, sometimes altitude isn't parsed correctly, leading
|
||||
// to overbright or overdark clouds
|
||||
// float vertex_alt = clamp(altitude * 0.30480 + relVector.z,1000.0,10000.0);
|
||||
float vertex_alt = clamp(altitude + relVector.z, 300.0, 10000.0);
|
||||
float yprime = -dot(relVector, lightHorizon);
|
||||
float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
|
||||
// two times terminator width governs how quickly light fades into shadow
|
||||
float terminator_width = 200000.0;
|
||||
float earthShade = 1.0- 0.9* smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt);
|
||||
float earthShadeFactor = 1.0 - smoothstep(0.4, 0.5, earthShade);
|
||||
|
||||
// compute the light at the position
|
||||
vec4 light_diffuse;
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
light_diffuse.b = light_func(lightArg -1.2 * air_pollution, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0);
|
||||
light_diffuse.g = light_func(lightArg -0.6 * air_pollution, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
light_diffuse.a = 1.0;
|
||||
|
||||
//light_diffuse *= cloud_self_shading;
|
||||
intensity = (1.0 - (0.8 * (1.0 - earthShade))) * length(light_diffuse.rgb);
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, min(scattering, cloud_self_shading) ))));
|
||||
|
||||
// correct ambient light intensity and hue before sunrise
|
||||
if (earthShade < 0.6)
|
||||
{
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,earthShade ) ));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
gl_FrontColor.rgb = intensity * shade * normalize(mix(light_diffuse.rgb, shadedFogColor, smoothstep(0.1,0.4, (1.0 - shade) ))) ;
|
||||
|
||||
// lightning
|
||||
vec2 lightningRelVector = relVector.xy - vec2(lightning_pos_x, lightning_pos_y);
|
||||
float rCoord = length(lightningRelVector);
|
||||
|
||||
vec3 flash_color = vec3 (0.43, 0.57, 1.0);
|
||||
float flash_factor = flash;
|
||||
|
||||
if (flash == 2)
|
||||
{
|
||||
flash_color = vec3 (0.8, 0.7, 0.4);
|
||||
flash_factor = 1;
|
||||
}
|
||||
|
||||
float rn = 0.5 + 0.5 * fract(gl_Color.x);
|
||||
gl_FrontColor.rgb += flash_factor * flash_color * (1.0 - smoothstep(lightning_range, 5.0 * lightning_range, rCoord)) * rn;
|
||||
|
||||
|
||||
// fading of cloudlets
|
||||
|
||||
if ((fogCoord > (0.9 * detail_range)) && (fogCoord > center_dist) && (shade_factor < 0.7)) {
|
||||
// cloudlet is almost at the detail range, so fade it out.
|
||||
gl_FrontColor.a = 1.0 - smoothstep(0.9 * detail_range, detail_range, fogCoord);
|
||||
} else {
|
||||
// As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
|
||||
gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(0.9 * range, range, fogCoord));
|
||||
}
|
||||
gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(visibility, 3.0* visibility, fogCoord));
|
||||
|
||||
fogFactor = exp(-fogCoord/visibility);
|
||||
|
||||
// haze of ground haze shader is slightly bluish
|
||||
hazeColor = light_diffuse.rgb;
|
||||
hazeColor.r = hazeColor.r * 0.83;
|
||||
hazeColor.g = hazeColor.g * 0.9;
|
||||
hazeColor = hazeColor * scattering;
|
||||
|
||||
|
||||
// Mie correction
|
||||
float Mie = 0.0;
|
||||
float MieFactor = dot(normalize(lightFull), normalize(relVector));
|
||||
|
||||
|
||||
mie_frag = MieFactor;
|
||||
mie_frag_mod = mie_suppress * (1.0 - smoothstep(0.4, 0.6, bottom_factor)) * (1.0 - smoothstep(detail_range, 1.5 * detail_range, fogCoord)) * smoothstep(0.65, 0.8, scattering)
|
||||
* smoothstep(0.7, 1.0, top_factor);
|
||||
|
||||
|
||||
if (bottom_factor < 0.4) {mie_frag_mod = 0.0;}
|
||||
|
||||
if (bottom_factor > 0.4)
|
||||
{
|
||||
MieFactor = dot(normalize(lightFull), normalize(relVector));
|
||||
Mie = 1.5 * smoothstep(0.9,1.0, MieFactor) * smoothstep(0.6, 0.8, bottom_factor) * (1.0-earthShadeFactor) ;
|
||||
//if (MieFactor < 0.0) {Mie = - Mie;}
|
||||
}
|
||||
//else {Mie = 0.0;}
|
||||
|
||||
if (Mie > 0.0)
|
||||
{
|
||||
hazeColor.r = mie_func(hazeColor.r, Mie);
|
||||
hazeColor.g = mie_func(hazeColor.g, 0.8* Mie);
|
||||
hazeColor.b = mie_func(hazeColor.b, 0.5* Mie);
|
||||
|
||||
gl_FrontColor.r = mie_func(gl_FrontColor.r, Mie);
|
||||
gl_FrontColor.g = mie_func(gl_FrontColor.g, 0.8* Mie);
|
||||
gl_FrontColor.b = mie_func(gl_FrontColor.b, 0.5*Mie);
|
||||
}
|
||||
else if (MieFactor < 0.0)
|
||||
{
|
||||
float thickness_reduction = smoothstep(0.4, 0.8, bottom_factor) ;
|
||||
float light_reduction = dot (lightFull, lightHorizon);
|
||||
light_reduction *= light_reduction;
|
||||
|
||||
float factor_b = 0.8 + 0.2 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ;
|
||||
float factor_r = 0.6 + 0.4 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ;
|
||||
float factor_g = 0.65 + 0.35 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ;
|
||||
hazeColor.r *= factor_r;
|
||||
hazeColor.g *= factor_g;
|
||||
hazeColor.b *= factor_b;
|
||||
|
||||
gl_FrontColor.r *= factor_r;
|
||||
gl_FrontColor.g *= factor_g;
|
||||
gl_FrontColor.b *= factor_b;
|
||||
}
|
||||
|
||||
gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * earthShadeFactor;
|
||||
hazeColor.rgb = hazeColor.rgb + moonLightColor * earthShadeFactor;
|
||||
gl_FrontColor.a = gl_FrontColor.a * alpha_factor;
|
||||
gl_BackColor = gl_FrontColor;
|
||||
}
|
||||
}
|
24
Compositor/Shaders/ALS/3dcloud.frag
Normal file
24
Compositor/Shaders/ALS/3dcloud.frag
Normal file
|
@ -0,0 +1,24 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
varying vec3 hazeColor;
|
||||
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
||||
if (base.a < 0.02)
|
||||
discard;
|
||||
|
||||
vec4 finalColor = base * gl_Color;
|
||||
|
||||
finalColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor );
|
||||
finalColor.rgb = filter_combined(finalColor.rgb);
|
||||
|
||||
gl_FragColor.rgb = finalColor.rgb;
|
||||
gl_FragColor.a = mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor));
|
||||
}
|
||||
|
268
Compositor/Shaders/ALS/3dcloud.vert
Normal file
268
Compositor/Shaders/ALS/3dcloud.vert
Normal file
|
@ -0,0 +1,268 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
varying float fogFactor;
|
||||
varying vec3 hazeColor;
|
||||
|
||||
uniform float range; // From /sim/rendering/clouds3d-vis-range
|
||||
uniform float detail_range; // From /sim/rendering/clouds3d_detail-range
|
||||
uniform float scattering;
|
||||
uniform float terminator;
|
||||
uniform float altitude;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float visibility;
|
||||
uniform float moonlight;
|
||||
uniform float air_pollution;
|
||||
uniform float flash;
|
||||
uniform float lightning_pos_x;
|
||||
uniform float lightning_pos_y;
|
||||
uniform float lightning_range;
|
||||
|
||||
attribute vec3 usrAttr1;
|
||||
attribute vec3 usrAttr2;
|
||||
|
||||
float alpha_factor = usrAttr1.r;
|
||||
float shade_factor = usrAttr1.g;
|
||||
float cloud_height = usrAttr1.b;
|
||||
float bottom_factor = usrAttr2.r;
|
||||
float middle_factor = usrAttr2.g;
|
||||
float top_factor = usrAttr2.b;
|
||||
|
||||
const float EarthRadius = 5800000.0;
|
||||
|
||||
vec3 moonlight_perception (in vec3 light);
|
||||
|
||||
// light_func is a generalized logistic function fit to the light intensity as a function
|
||||
// of scaled terminator position obtained from Flightgear core
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
x = x-0.5;
|
||||
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x > 30.0) {return e;}
|
||||
if (x < -15.0) {return 0.03;}
|
||||
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
|
||||
float mie_func (in float x, in float Mie)
|
||||
{
|
||||
return x + 2.0 * x * Mie * (1.0 -0.8*x) * (1.0 -0.8*x);
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
|
||||
//shade_factor = shade_factor * cloud_self_shading;
|
||||
//top_factor = top_factor * cloud_self_shading;
|
||||
//shade_factor = min(shade_factor, top_factor);
|
||||
//middle_factor = min(middle_factor, top_factor);
|
||||
//bottom_factor = min(bottom_factor, top_factor);
|
||||
|
||||
float intensity;
|
||||
float mix_factor;
|
||||
|
||||
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight * scattering;
|
||||
moonLightColor = moonlight_perception (moonLightColor);
|
||||
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
||||
vec3 u = normalize(ep.xyz - l.xyz);
|
||||
|
||||
// Find a rotation matrix that rotates 1,0,0 into u. u, r and w are
|
||||
// the columns of that matrix.
|
||||
vec3 absu = abs(u);
|
||||
vec3 r = normalize(vec3(-u.y, u.x, 0.0));
|
||||
vec3 w = cross(u, r);
|
||||
|
||||
// Do the matrix multiplication by [ u r w pos]. Assume no
|
||||
// scaling in the homogeneous component of pos.
|
||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
gl_Position.xyz = gl_Vertex.x * u;
|
||||
gl_Position.xyz += gl_Vertex.y * r;
|
||||
gl_Position.xyz += gl_Vertex.z * w;
|
||||
// Apply Z scaling to allow sprites to be squashed in the z-axis
|
||||
gl_Position.z = gl_Position.z * gl_Color.w;
|
||||
|
||||
// Now shift the sprite to the correct position in the cloud.
|
||||
gl_Position.xyz += gl_Color.xyz;
|
||||
|
||||
// Determine a lighting normal based on the vertex position from the
|
||||
// center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
|
||||
float n = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
normalize(vec3(gl_ModelViewMatrix * vec4(- gl_Position.x, - gl_Position.y, - gl_Position.z, 0.0))));
|
||||
|
||||
// Determine the position - used for fog and shading calculations
|
||||
float fogCoord = length(vec3(gl_ModelViewMatrix * vec4(gl_Color.x, gl_Color.y, gl_Color.z, 1.0)));
|
||||
float center_dist = length(vec3(gl_ModelViewMatrix * vec4(0.0,0.0,0.0,1.0)));
|
||||
|
||||
if ((fogCoord > detail_range) && (fogCoord > center_dist) && (shade_factor < 0.7)) {
|
||||
// More than detail_range away, so discard all sprites on opposite side of
|
||||
// cloud center by shifting them beyond the view fustrum
|
||||
gl_Position = vec4(0.0,0.0,10.0,1.0);
|
||||
gl_FrontColor.a = 0.0;
|
||||
} else {
|
||||
|
||||
// Determine the shading of the vertex. We shade it based on it's position
|
||||
// in the cloud relative to the sun, and it's vertical position in the cloud.
|
||||
float shade = mix(shade_factor, top_factor, smoothstep(-0.3, 0.3, n));
|
||||
//if (n < 0) {
|
||||
// shade = mix(top_factor, shade_factor, abs(n));
|
||||
//}
|
||||
|
||||
if (gl_Position.z < 0.5 * cloud_height) {
|
||||
shade = min(shade, mix(bottom_factor, middle_factor, gl_Position.z * 2.0 / cloud_height));
|
||||
} else {
|
||||
shade = min(shade, mix(middle_factor, top_factor, gl_Position.z * 2.0 / cloud_height - 1.0));
|
||||
}
|
||||
|
||||
//float h = gl_Position.z / cloud_height;
|
||||
//if (h < 0.5) {
|
||||
// shade = min(shade, mix(bottom_factor, middle_factor, smoothstep(0.0, 0.5, h)));
|
||||
//} else {
|
||||
// shade = min(shade, mix(middle_factor, top_factor, smoothstep(2.0 * (h - 0.5)));
|
||||
// }
|
||||
|
||||
// Final position of the sprite
|
||||
vec3 relVector = gl_Position.xyz - ep.xyz;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
|
||||
|
||||
|
||||
// Light at the final position
|
||||
|
||||
// first obtain normal to sun position
|
||||
|
||||
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
|
||||
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
|
||||
|
||||
|
||||
|
||||
// yprime is the distance of the vertex into sun direction, corrected for altitude
|
||||
// the altitude correction is clamped to reasonable values, sometimes altitude isn't parsed correctly, leading
|
||||
// to overbright or overdark clouds
|
||||
// float vertex_alt = clamp(altitude * 0.30480 + relVector.z,1000.0,10000.0);
|
||||
float vertex_alt = clamp(altitude + relVector.z, 300.0, 10000.0);
|
||||
float yprime = -dot(relVector, lightHorizon);
|
||||
float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
|
||||
// two times terminator width governs how quickly light fades into shadow
|
||||
float terminator_width = 200000.0;
|
||||
float earthShade = 1.0- 0.9* smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt);
|
||||
float earthShadeFactor = 1.0 - smoothstep(0.4, 0.5, earthShade);
|
||||
|
||||
// compute the light at the position
|
||||
vec4 light_diffuse;
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
light_diffuse.b = light_func(lightArg -1.2 * air_pollution, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0);
|
||||
light_diffuse.g = light_func(lightArg -0.6 * air_pollution, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
light_diffuse.a = 1.0;
|
||||
|
||||
//light_diffuse *= cloud_self_shading;
|
||||
intensity = (1.0 - (0.8 * (1.0 - earthShade))) * length(light_diffuse.rgb);
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, min(scattering, cloud_self_shading) ))));
|
||||
|
||||
// correct ambient light intensity and hue before sunrise
|
||||
if (earthShade < 0.6)
|
||||
{
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,earthShade ) ));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
gl_FrontColor.rgb = intensity * shade * normalize(mix(light_diffuse.rgb, shadedFogColor, smoothstep(0.1,0.4, (1.0 - shade) ))) ;
|
||||
|
||||
// lightning
|
||||
vec2 lightningRelVector = relVector.xy - vec2(lightning_pos_x, lightning_pos_y);
|
||||
float rCoord = length(lightningRelVector);
|
||||
|
||||
vec3 flash_color = vec3 (0.43, 0.57, 1.0);
|
||||
float flash_factor = flash;
|
||||
|
||||
if (flash == 2)
|
||||
{
|
||||
flash_color = vec3 (0.8, 0.7, 0.4);
|
||||
flash_factor = 1;
|
||||
}
|
||||
|
||||
float rn = 0.5 + 0.5 * fract(gl_Color.x);
|
||||
gl_FrontColor.rgb += flash_factor * flash_color * (1.0 - smoothstep(lightning_range, 5.0 * lightning_range, rCoord)) * rn;
|
||||
|
||||
|
||||
// fading of cloudlets
|
||||
|
||||
if ((fogCoord > (0.9 * detail_range)) && (fogCoord > center_dist) && (shade_factor < 0.7)) {
|
||||
// cloudlet is almost at the detail range, so fade it out.
|
||||
gl_FrontColor.a = 1.0 - smoothstep(0.9 * detail_range, detail_range, fogCoord);
|
||||
} else {
|
||||
// As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
|
||||
gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(0.9 * range, range, fogCoord));
|
||||
}
|
||||
gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(visibility, 3.0* visibility, fogCoord));
|
||||
|
||||
fogFactor = exp(-fogCoord/visibility);
|
||||
|
||||
// haze of ground haze shader is slightly bluish
|
||||
hazeColor = light_diffuse.rgb;
|
||||
hazeColor.r = hazeColor.r * 0.83;
|
||||
hazeColor.g = hazeColor.g * 0.9;
|
||||
hazeColor = hazeColor * scattering;
|
||||
|
||||
|
||||
// Mie correction
|
||||
float Mie = 0.0;
|
||||
float MieFactor = 0.0;
|
||||
|
||||
if (bottom_factor > 0.4)
|
||||
{
|
||||
MieFactor = dot(normalize(lightFull), normalize(relVector));
|
||||
Mie = 1.5 * smoothstep(0.9,1.0, MieFactor) * smoothstep(0.6, 0.8, bottom_factor) * (1.0-earthShadeFactor) ;
|
||||
//if (MieFactor < 0.0) {Mie = - Mie;}
|
||||
}
|
||||
//else {Mie = 0.0;}
|
||||
|
||||
if (Mie > 0.0)
|
||||
{
|
||||
hazeColor.r = mie_func(hazeColor.r, Mie);
|
||||
hazeColor.g = mie_func(hazeColor.g, 0.8* Mie);
|
||||
hazeColor.b = mie_func(hazeColor.b, 0.5* Mie);
|
||||
|
||||
gl_FrontColor.r = mie_func(gl_FrontColor.r, Mie);
|
||||
gl_FrontColor.g = mie_func(gl_FrontColor.g, 0.8* Mie);
|
||||
gl_FrontColor.b = mie_func(gl_FrontColor.b, 0.5*Mie);
|
||||
}
|
||||
else if (MieFactor < 0.0)
|
||||
{
|
||||
float thickness_reduction = smoothstep(0.4, 0.8, bottom_factor) ;
|
||||
float light_reduction = dot (lightFull, lightHorizon);
|
||||
light_reduction *= light_reduction;
|
||||
|
||||
float factor_b = 0.8 + 0.2 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ;
|
||||
float factor_r = 0.6 + 0.4 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ;
|
||||
float factor_g = 0.65 + 0.35 * (1.0 - smoothstep(0.0, 0.7, -MieFactor) * thickness_reduction * light_reduction) ;
|
||||
hazeColor.r *= factor_r;
|
||||
hazeColor.g *= factor_g;
|
||||
hazeColor.b *= factor_b;
|
||||
|
||||
gl_FrontColor.r *= factor_r;
|
||||
gl_FrontColor.g *= factor_g;
|
||||
gl_FrontColor.b *= factor_b;
|
||||
}
|
||||
|
||||
gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * earthShadeFactor;
|
||||
hazeColor.rgb = hazeColor.rgb + moonLightColor * earthShadeFactor;
|
||||
gl_FrontColor.a = gl_FrontColor.a * alpha_factor;
|
||||
gl_BackColor = gl_FrontColor;
|
||||
}
|
||||
}
|
659
Compositor/Shaders/ALS/agriculture.frag
Normal file
659
Compositor/Shaders/ALS/agriculture.frag
Normal file
|
@ -0,0 +1,659 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, May 2014
|
||||
// based on ALS terrain shader
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
varying vec4 diffuse_term;
|
||||
varying vec3 normal;
|
||||
varying vec3 relPos;
|
||||
varying vec2 rawPos;
|
||||
varying vec3 worldPos;
|
||||
varying vec3 ecViewdir;
|
||||
|
||||
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D mix_texture;
|
||||
uniform sampler2D grain_texture;
|
||||
uniform sampler2D gradient_texture;
|
||||
|
||||
|
||||
varying float steepness;
|
||||
varying vec2 grad_dir;
|
||||
|
||||
|
||||
uniform float visibility;
|
||||
uniform float avisibility;
|
||||
uniform float scattering;
|
||||
uniform float terminator;
|
||||
uniform float terrain_alt;
|
||||
uniform float hazeLayerAltitude;
|
||||
uniform float overcast;
|
||||
uniform float eye_alt;
|
||||
uniform float snowlevel;
|
||||
uniform float dust_cover_factor;
|
||||
uniform float lichen_cover_factor;
|
||||
uniform float wetness;
|
||||
uniform float fogstructure;
|
||||
uniform float snow_thickness_factor;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float season;
|
||||
uniform float air_pollution;
|
||||
uniform float grain_strength;
|
||||
uniform float intrinsic_wetness;
|
||||
uniform float overlay_fraction;
|
||||
uniform float overlay_scale;
|
||||
uniform float rotation_scale;
|
||||
uniform float distortion_factor;
|
||||
uniform float uv_xoffset;
|
||||
uniform float uv_yoffset;
|
||||
uniform float landing_light1_offset;
|
||||
uniform float landing_light2_offset;
|
||||
uniform float landing_light3_offset;
|
||||
|
||||
uniform float dust_resistance;
|
||||
uniform float WindE;
|
||||
uniform float WindN;
|
||||
uniform float osg_SimulationTime;
|
||||
|
||||
uniform int quality_level;
|
||||
uniform int tquality_level;
|
||||
uniform int wind_effects;
|
||||
uniform int cloud_shadow_flag;
|
||||
uniform int rotation_flag;
|
||||
uniform int use_searchlight;
|
||||
uniform int use_landing_light;
|
||||
uniform int use_alt_landing_light;
|
||||
|
||||
|
||||
const float EarthRadius = 5800000.0;
|
||||
const float terminator_width = 200000.0;
|
||||
|
||||
float alt;
|
||||
float eShade;
|
||||
float yprime_alt;
|
||||
float mie_angle;
|
||||
|
||||
float shadow_func (in float x, in float y, in float noise, in float dist);
|
||||
float Noise2D(in vec2 coord, in float wavelength);
|
||||
float Noise3D(in vec3 coord, in float wavelength);
|
||||
float VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand);
|
||||
float SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness);
|
||||
float fog_func (in float targ, in float alt);
|
||||
float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt);
|
||||
float alt_factor(in float eye_alt, in float vertex_alt);
|
||||
float light_distance_fading(in float dist);
|
||||
float fog_backscatter(in float avisibility);
|
||||
|
||||
vec3 rayleigh_out_shift(in vec3 color, in float outscatter);
|
||||
vec3 get_hazeColor(in float light_arg);
|
||||
vec3 searchlight();
|
||||
vec3 landing_light(in float offset, in float offsetv);
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
|
||||
// a fade function for procedural scales which are smaller than a pixel
|
||||
|
||||
float detail_fade (in float scale, in float angle, in float dist)
|
||||
{
|
||||
float fade_dist = 2000.0 * scale * angle/max(pow(steepness,4.0), 0.1);
|
||||
|
||||
return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
yprime_alt = diffuse_term.a;
|
||||
//diffuse_term.a = 1.0;
|
||||
mie_angle = gl_Color.a;
|
||||
float effective_scattering = min(scattering, cloud_self_shading);
|
||||
|
||||
// distance to fragment
|
||||
float dist = length(relPos);
|
||||
// angle of view vector with horizon
|
||||
float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
|
||||
// float altitude of fragment above sea level
|
||||
float msl_altitude = (relPos.z + eye_alt);
|
||||
|
||||
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
// this is taken from default.frag
|
||||
vec3 n;
|
||||
float NdotL, NdotHV, fogFactor;
|
||||
vec4 color = gl_Color;
|
||||
color.a = 1.0;
|
||||
vec3 lightDir = gl_LightSource[0].position.xyz;
|
||||
vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewdir));
|
||||
vec4 texel;
|
||||
vec4 snow_texel;
|
||||
vec4 detail_texel;
|
||||
vec4 mix_texel;
|
||||
vec4 grain_texel;
|
||||
vec4 dot_texel;
|
||||
vec4 gradient_texel;
|
||||
vec4 foam_texel;
|
||||
vec4 fragColor;
|
||||
vec4 specular = vec4(0.0);
|
||||
float intensity;
|
||||
|
||||
|
||||
|
||||
// Wind motion of the overlay noise simulating movement of vegetation and loose debris
|
||||
|
||||
vec2 windPos;
|
||||
|
||||
if (wind_effects > 1)
|
||||
{
|
||||
float windSpeed = length(vec2 (WindE,WindN)) /3.0480;
|
||||
// interfering sine wave wind pattern
|
||||
float sineTerm = sin(0.35 * windSpeed * osg_SimulationTime + 0.05 * (rawPos.x + rawPos.y));
|
||||
sineTerm = sineTerm + sin(0.3 * windSpeed * osg_SimulationTime + 0.04 * (rawPos.x + rawPos.y));
|
||||
sineTerm = sineTerm + sin(0.22 * windSpeed * osg_SimulationTime + 0.05 * (rawPos.x + rawPos.y));
|
||||
sineTerm = sineTerm/3.0;
|
||||
// non-linear amplification to simulate gusts
|
||||
sineTerm = sineTerm * sineTerm;//smoothstep(0.2, 1.0, sineTerm);
|
||||
|
||||
// wind starts moving dust and leaves at around 8 m/s
|
||||
float timeArg = 0.01 * osg_SimulationTime * windSpeed * smoothstep(8.0, 15.0, windSpeed);
|
||||
timeArg = timeArg + 0.02 * sineTerm;
|
||||
|
||||
windPos = vec2 (rawPos.x + WindN * timeArg, rawPos.y + WindE * timeArg);
|
||||
}
|
||||
else
|
||||
{
|
||||
windPos = rawPos.xy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// get noise at different wavelengths
|
||||
|
||||
// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow
|
||||
// 50m: detail texel
|
||||
// 250m: detail texel
|
||||
// 500m: distortion and overlay
|
||||
// 1500m: overlay, detail, dust, fog
|
||||
// 2000m: overlay, detail, snow, fog
|
||||
|
||||
// Perlin noise
|
||||
|
||||
float noise_10m = Noise2D(rawPos.xy, 10.0);
|
||||
float noise_5m = Noise2D(rawPos.xy ,5.0);
|
||||
float noise_2m = Noise2D(rawPos.xy ,2.0);
|
||||
float noise_1m = Noise2D(rawPos.xy ,1.0);
|
||||
float noise_01m = Noise2D(windPos.xy, 0.1);
|
||||
|
||||
float noisegrad_10m;
|
||||
float noisegrad_5m;
|
||||
float noisegrad_2m;
|
||||
float noisegrad_1m;
|
||||
|
||||
|
||||
|
||||
float noise_25m = Noise2D(rawPos.xy, 25.0);
|
||||
float noise_50m = Noise2D(rawPos.xy, 50.0);
|
||||
|
||||
|
||||
float noise_250m = Noise3D(worldPos.xyz,250.0);
|
||||
float noise_500m = Noise3D(worldPos.xyz, 500.0);
|
||||
float noise_1500m = Noise3D(worldPos.xyz, 1500.0);
|
||||
float noise_2000m = Noise3D(worldPos.xyz, 2000.0);
|
||||
|
||||
// tiling noise
|
||||
|
||||
float vnoise_overlay = VoronoiNoise2D(rawPos.xy, overlay_scale, distortion_factor, distortion_factor);
|
||||
float vnoise_rotation = VoronoiNoise2D(rawPos.xy, rotation_scale, distortion_factor, distortion_factor);
|
||||
|
||||
|
||||
|
||||
// slope noise
|
||||
|
||||
float slopenoise_50m = SlopeLines2D(rawPos, grad_dir, 50.0, steepness);
|
||||
float slopenoise_100m = SlopeLines2D(rawPos, grad_dir, 100.0, steepness);
|
||||
|
||||
float snownoise_25m = mix(noise_25m, slopenoise_50m, clamp(3.0*(1.0-steepness),0.0,1.0));
|
||||
float snownoise_50m = mix(noise_50m, slopenoise_100m, clamp(3.0*(1.0-steepness),0.0,1.0));
|
||||
|
||||
|
||||
|
||||
// get the texels
|
||||
|
||||
float distortion_factor = 1.0;
|
||||
vec2 stprime;
|
||||
int flag = 1;
|
||||
int mix_flag = 1;
|
||||
float noise_term;
|
||||
float snow_alpha;
|
||||
|
||||
float angle = vnoise_rotation * 2.0 * 3.1415;
|
||||
|
||||
if (rotation_flag ==2)
|
||||
{
|
||||
if (vnoise_rotation < 0.25) {angle = 0.5 * 3.1415926;}
|
||||
else if (vnoise_rotation < 0.5) {angle = 3.1415926;}
|
||||
else if (vnoise_rotation < 0.75) {angle = 1.5 * 3.1415926;}
|
||||
else {angle = 0.0;}
|
||||
}
|
||||
|
||||
if (rotation_flag > 0)
|
||||
{
|
||||
stprime = vec2 (cos(angle)*gl_TexCoord[0].s + sin(angle)*gl_TexCoord[0].t, -sin(angle)*gl_TexCoord[0].s + cos(angle)*gl_TexCoord[0].t);
|
||||
}
|
||||
else
|
||||
{stprime = gl_TexCoord[0].st;}
|
||||
stprime+= vec2 (uv_xoffset, uv_yoffset);
|
||||
texel = texture2D(texture, stprime);
|
||||
float local_autumn_factor = texel.a;
|
||||
grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * 25.0);
|
||||
gradient_texel = texture2D(gradient_texture, gl_TexCoord[0].st * 4.0);
|
||||
|
||||
|
||||
// we need to fade procedural structures when they get smaller than a single pixel, for this we need
|
||||
// to know under what angle we see the surface
|
||||
|
||||
float view_angle = abs(dot(normalize(normal), normalize(ecViewdir)));
|
||||
float sfactor = sqrt(2.0 * (1.0-steepness)/0.03) + abs(ct)/0.15;
|
||||
|
||||
// the snow texel is generated procedurally
|
||||
if (msl_altitude +500.0 > snowlevel)
|
||||
{
|
||||
snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_500m + 0.1* (1.0 - noise_10m) );
|
||||
snow_texel.r = snow_texel.r * (0.9 + 0.05 * (noise_10m + noise_5m));
|
||||
snow_texel.g = snow_texel.g * (0.9 + 0.05 * (noise_10m + noise_5m));
|
||||
snow_texel.a = 1.0;
|
||||
noise_term = 0.1 * (noise_500m-0.5) ;
|
||||
noise_term = noise_term + 0.2 * (snownoise_50m -0.5) * detail_fade(50.0, view_angle, 0.5*dist) ;
|
||||
noise_term = noise_term + 0.2 * (snownoise_25m -0.5) * detail_fade(25.0, view_angle, 0.5*dist) ;
|
||||
noise_term = noise_term + 0.3 * (noise_10m -0.5) * detail_fade(10.0, view_angle, 0.8*dist) ;
|
||||
noise_term = noise_term + 0.3 * (noise_5m - 0.5) * detail_fade(5.0, view_angle, dist);
|
||||
noise_term = noise_term + 0.15 * (noise_2m -0.5) * detail_fade(2.0, view_angle, dist);
|
||||
noise_term = noise_term + 0.08 * (noise_1m -0.5) * detail_fade(1.0, view_angle, dist);
|
||||
snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(msl_altitude -snowlevel) );
|
||||
}
|
||||
|
||||
// the mixture/gradient texture
|
||||
mix_texel = texture2D(mix_texture, stprime * 1.3);
|
||||
if (mix_texel.a <0.1) {mix_flag = 0;}
|
||||
|
||||
|
||||
|
||||
// texture preparation according to detail level
|
||||
|
||||
// mix in hires texture patches
|
||||
|
||||
float dist_fact;
|
||||
float nSum;
|
||||
float mix_factor;
|
||||
|
||||
// first the second texture overlay
|
||||
// transition model 0: random patch overlay without any gradient information
|
||||
// transition model 1: only gradient-driven transitions, no randomness
|
||||
|
||||
|
||||
if (mix_flag == 1)
|
||||
{
|
||||
//nSum = 0.18 * (2.0 * noise_2000m + 2.0 * noise_1500m + noise_500m);
|
||||
//nSum = mix(nSum, 0.5, max(0.0, 2.0 * (transition_model - 0.5)));
|
||||
//nSum = nSum + 0.4 * (1.0 -smoothstep(0.9,0.95, abs(steepness)+ 0.05 * (noise_50m - 0.5))) * min(1.0, 2.0 * transition_model);
|
||||
//mix_factor = smoothstep(0.5, 0.54, nSum);
|
||||
if (vnoise_overlay > overlay_fraction) {mix_factor = 0.0;} else {mix_factor = 1.0;}
|
||||
texel = mix(texel, mix_texel, mix_factor);
|
||||
local_autumn_factor = texel.a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// rock for very steep gradients
|
||||
|
||||
if (gradient_texel.a > 0.0)
|
||||
{
|
||||
texel = mix(texel, gradient_texel, 1.0 - smoothstep(0.75,0.8,abs(steepness)+ 0.00002* msl_altitude + 0.05 * (noise_50m - 0.5)));
|
||||
local_autumn_factor = texel.a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// then the grain texture overlay
|
||||
|
||||
texel.rgb = mix(texel.rgb, grain_texel.rgb, grain_strength * grain_texel.a * (1.0 - mix_factor) * (1.0-smoothstep(2000.0,5000.0, dist)));
|
||||
|
||||
// for really hires, add procedural noise overlay
|
||||
texel.rgb = texel.rgb * (1.0 + 0.4 * (noise_01m-0.5) * detail_fade(0.1, view_angle, dist)) ;
|
||||
|
||||
// autumn colors
|
||||
|
||||
float autumn_factor = season * 2.0 * (1.0 - local_autumn_factor) ;
|
||||
|
||||
|
||||
texel.r = min(1.0, (1.0 + 2.5 * autumn_factor) * texel.r);
|
||||
texel.g = texel.g;
|
||||
texel.b = max(0.0, (1.0 - 4.0 * autumn_factor) * texel.b);
|
||||
|
||||
|
||||
if (local_autumn_factor < 1.0)
|
||||
{
|
||||
intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season));
|
||||
texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season)));
|
||||
}
|
||||
|
||||
// slope line overlay
|
||||
texel.rgb = texel.rgb * (1.0 - 0.12 * slopenoise_50m - 0.08 * slopenoise_100m);
|
||||
|
||||
//const vec4 dust_color = vec4 (0.76, 0.71, 0.56, 1.0);
|
||||
const vec4 dust_color = vec4 (0.76, 0.65, 0.45, 1.0);
|
||||
const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0);
|
||||
|
||||
// mix vegetation
|
||||
float gradient_factor = smoothstep(0.5, 1.0, steepness);
|
||||
texel = mix(texel, lichen_color, gradient_factor * (0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m))) );
|
||||
// mix dust
|
||||
texel = mix(texel, dust_color, clamp(0.5 * dust_cover_factor *dust_resistance + 3.0 * dust_cover_factor * dust_resistance *(((noise_1500m - 0.5) * 0.125)+0.125 ) - 0.03*slopenoise_100m,0.0, 1.0) );
|
||||
// mix snow
|
||||
float snow_mix_factor = 0.0;
|
||||
if (msl_altitude +500.0 > snowlevel)
|
||||
{
|
||||
snow_alpha = smoothstep(0.75, 0.85, abs(steepness));
|
||||
snow_mix_factor = snow_texel.a* smoothstep(snowlevel, snowlevel+200.0, snow_alpha * msl_altitude+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0);
|
||||
texel = mix(texel, snow_texel, snow_mix_factor);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// get distribution of water when terrain is wet
|
||||
|
||||
float combined_wetness = min(1.0, wetness + intrinsic_wetness);
|
||||
float water_threshold1;
|
||||
float water_threshold2;
|
||||
float water_factor =0.0;
|
||||
|
||||
|
||||
if ((dist < 5000.0)&& (quality_level > 3) && (combined_wetness>0.0))
|
||||
{
|
||||
water_threshold1 = 1.0-0.5* combined_wetness;
|
||||
water_threshold2 = 1.0 - 0.3 * combined_wetness;
|
||||
water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness));
|
||||
}
|
||||
|
||||
// darken wet terrain
|
||||
|
||||
texel.rgb = texel.rgb * (1.0 - 0.6 * combined_wetness);
|
||||
|
||||
|
||||
|
||||
// light computations
|
||||
|
||||
|
||||
vec4 light_specular = gl_LightSource[0].specular;
|
||||
|
||||
// If gl_Color.a == 0, this is a back-facing polygon and the
|
||||
// normal should be reversed.
|
||||
//n = (2.0 * gl_Color.a - 1.0) * normal;
|
||||
n = normal;//vec3 (nvec.x, nvec.y, sqrt(1.0 -pow(nvec.x,2.0) - pow(nvec.y,2.0) ));
|
||||
n = normalize(n);
|
||||
|
||||
NdotL = dot(n, lightDir);
|
||||
|
||||
noisegrad_10m = (noise_10m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0))/0.05;
|
||||
noisegrad_5m = (noise_5m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),5.0))/0.05;
|
||||
noisegrad_2m = (noise_2m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),2.0))/0.05;
|
||||
noisegrad_1m = (noise_1m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),1.0))/0.05;
|
||||
|
||||
|
||||
|
||||
NdotL = NdotL + (noisegrad_10m * detail_fade(10.0, view_angle,dist) + 0.5* noisegrad_5m * detail_fade(5.0, view_angle,dist)) * mix_factor/0.8;
|
||||
NdotL = NdotL + 0.15 * noisegrad_2m * mix_factor/0.8 * detail_fade(2.0,view_angle,dist);
|
||||
NdotL = NdotL + 0.1 * noisegrad_2m * detail_fade(2.0,view_angle,dist);
|
||||
NdotL = NdotL + 0.05 * noisegrad_1m * detail_fade(1.0, view_angle,dist);
|
||||
|
||||
if (NdotL > 0.0) {
|
||||
if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);}
|
||||
color += diffuse_term * NdotL;
|
||||
NdotHV = max(dot(n, halfVector), 0.0);
|
||||
if (gl_FrontMaterial.shininess > 0.0)
|
||||
specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0)))
|
||||
* light_specular.rgb
|
||||
* pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)));
|
||||
}
|
||||
color.a = 1.0;//diffuse_term.a;
|
||||
// This shouldn't be necessary, but our lighting becomes very
|
||||
// saturated. Clamping the color before modulating by the texture
|
||||
// is closer to what the OpenGL fixed function pipeline does.
|
||||
color = clamp(color, 0.0, 1.0);
|
||||
|
||||
vec3 secondary_light = vec3 (0.0,0.0,0.0);
|
||||
|
||||
if (use_searchlight == 1)
|
||||
{
|
||||
secondary_light += searchlight();
|
||||
}
|
||||
if (use_landing_light == 1)
|
||||
{
|
||||
secondary_light += landing_light(landing_light1_offset, landing_light3_offset);
|
||||
}
|
||||
if (use_alt_landing_light == 1)
|
||||
{
|
||||
secondary_light += landing_light(landing_light2_offset, landing_light3_offset);
|
||||
}
|
||||
color.rgb +=secondary_light * light_distance_fading(dist);
|
||||
|
||||
|
||||
fragColor = color * texel + specular;
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
vec3 hazeColor = get_hazeColor(lightArg);
|
||||
|
||||
|
||||
|
||||
// Rayleigh color shift due to out-scattering
|
||||
float rayleigh_length = 0.5 * avisibility * (2.5 - 1.9 * air_pollution)/alt_factor(eye_alt, eye_alt+relPos.z);
|
||||
float outscatter = 1.0-exp(-dist/rayleigh_length);
|
||||
fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter);
|
||||
|
||||
// Rayleigh color shift due to in-scattering
|
||||
|
||||
float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt + 420000.0);
|
||||
//float lightIntensity = length(diffuse_term.rgb)/1.73 * rShade;
|
||||
float lightIntensity = length(hazeColor * effective_scattering) * rShade;
|
||||
vec3 rayleighColor = vec3 (0.17, 0.52, 0.87) * lightIntensity;
|
||||
float rayleighStrength = rayleigh_in_func(dist, air_pollution, avisibility/max(lightIntensity,0.05), eye_alt, eye_alt + relPos.z);
|
||||
fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength);
|
||||
|
||||
|
||||
// here comes the terrain haze model
|
||||
|
||||
|
||||
float delta_z = hazeLayerAltitude - eye_alt;
|
||||
|
||||
float mvisibility = min(visibility,avisibility);
|
||||
|
||||
if (dist > 0.04 * mvisibility)
|
||||
{
|
||||
|
||||
alt = eye_alt;
|
||||
|
||||
|
||||
float transmission;
|
||||
float vAltitude;
|
||||
float delta_zv;
|
||||
float H;
|
||||
float distance_in_layer;
|
||||
float transmission_arg;
|
||||
|
||||
|
||||
|
||||
|
||||
// we solve the geometry what part of the light path is attenuated normally and what is through the haze layer
|
||||
|
||||
if (delta_z > 0.0) // we're inside the layer
|
||||
{
|
||||
if (ct < 0.0) // we look down
|
||||
{
|
||||
distance_in_layer = dist;
|
||||
vAltitude = min(distance_in_layer,mvisibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
else // we may look through upper layer edge
|
||||
{
|
||||
H = dist * ct;
|
||||
if (H > delta_z) {distance_in_layer = dist/H * delta_z;}
|
||||
else {distance_in_layer = dist;}
|
||||
vAltitude = min(distance_in_layer,visibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
}
|
||||
else // we see the layer from above, delta_z < 0.0
|
||||
{
|
||||
H = dist * -ct;
|
||||
if (H < (-delta_z)) // we don't see into the layer at all, aloft visibility is the only fading
|
||||
{
|
||||
distance_in_layer = 0.0;
|
||||
delta_zv = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vAltitude = H + delta_z;
|
||||
distance_in_layer = vAltitude/H * dist;
|
||||
vAltitude = min(distance_in_layer,visibility) * (-ct);
|
||||
delta_zv = vAltitude;
|
||||
}
|
||||
}
|
||||
|
||||
// blur of the haze layer edge
|
||||
|
||||
float blur_thickness = 50.0;
|
||||
float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist;
|
||||
float ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01;
|
||||
float ctblur = 0.035 ;
|
||||
|
||||
float blur_dist;
|
||||
|
||||
if (abs(delta_z) < 400.0)
|
||||
{
|
||||
blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z);
|
||||
blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct));
|
||||
distance_in_layer = max(distance_in_layer, blur_dist);
|
||||
}
|
||||
|
||||
|
||||
// ground haze cannot be thinner than aloft visibility in the model,
|
||||
// so we need to use aloft visibility otherwise
|
||||
|
||||
|
||||
transmission_arg = (dist-distance_in_layer)/avisibility;
|
||||
|
||||
|
||||
float eqColorFactor;
|
||||
|
||||
|
||||
|
||||
if (visibility < avisibility)
|
||||
{
|
||||
if (quality_level > 3)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility + 1.0 * visibility * fogstructure * 0.06 * (noise_1500m + noise_2000m -1.0) ));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/visibility);
|
||||
}
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 - effective_scattering);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (quality_level > 3)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility + 1.0 * avisibility * fogstructure * 0.06 * (noise_1500m + noise_2000m - 1.0) ));
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/avisibility);
|
||||
}
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 - effective_scattering);
|
||||
}
|
||||
|
||||
|
||||
|
||||
transmission = fog_func(transmission_arg, alt);
|
||||
|
||||
// there's always residual intensity, we should never be driven to zero
|
||||
if (eqColorFactor < 0.2) eqColorFactor = 0.2;
|
||||
|
||||
|
||||
//float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
|
||||
|
||||
// now dim the light for haze
|
||||
eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt);
|
||||
|
||||
// Mie-like factor
|
||||
|
||||
if (lightArg < 10.0)
|
||||
{
|
||||
intensity = length(hazeColor);
|
||||
float mie_magnitude = 0.5 * smoothstep(350000.0, 150000.0, terminator-sqrt(2.0 * EarthRadius * terrain_alt));
|
||||
hazeColor = intensity * ((1.0 - mie_magnitude) + mie_magnitude * mie_angle) * normalize(mix(hazeColor, vec3 (0.5, 0.58, 0.65), mie_magnitude * (0.5 - 0.5 * mie_angle)) );
|
||||
}
|
||||
|
||||
intensity = length(hazeColor);
|
||||
|
||||
if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColor doesn't come out correctly
|
||||
{
|
||||
|
||||
|
||||
// high altitude desaturation of the haze color
|
||||
hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, alt)));
|
||||
|
||||
// blue hue of haze
|
||||
hazeColor.x = hazeColor.x * 0.83;
|
||||
hazeColor.y = hazeColor.y * 0.9;
|
||||
|
||||
|
||||
// additional blue in indirect light
|
||||
float fade_out = max(0.65 - 0.3 *overcast, 0.45);
|
||||
intensity = length(hazeColor);
|
||||
hazeColor = intensity * normalize(mix(hazeColor, 1.5* shadedFogColor, 1.0 -smoothstep(0.25, fade_out,eShade) ));
|
||||
|
||||
// change haze color to blue hue for strong fogging
|
||||
hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor))));
|
||||
|
||||
|
||||
|
||||
// reduce haze intensity when looking at shaded surfaces, only in terminator region
|
||||
float shadow = mix( min(1.0 + dot(n,lightDir),1.0), 1.0, 1.0-smoothstep(0.1, 0.4, transmission));
|
||||
hazeColor = mix(shadow * hazeColor, hazeColor, 0.3 + 0.7* smoothstep(250000.0, 400000.0, terminator));
|
||||
}
|
||||
|
||||
// don't let the light fade out too rapidly
|
||||
lightArg = (terminator + 200000.0)/100000.0;
|
||||
float minLightIntensity = min(0.2,0.16 * lightArg + 0.5);
|
||||
vec3 minLight = minLightIntensity * vec3 (0.2, 0.3, 0.4);
|
||||
|
||||
hazeColor.rgb *= eqColorFactor * eShade;
|
||||
hazeColor.rgb = max(hazeColor.rgb, minLight.rgb);
|
||||
|
||||
fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission);
|
||||
|
||||
}
|
||||
|
||||
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||
|
||||
gl_FragColor = fragColor;
|
||||
|
||||
}
|
||||
|
521
Compositor/Shaders/ALS/airfield.frag
Normal file
521
Compositor/Shaders/ALS/airfield.frag
Normal file
|
@ -0,0 +1,521 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
varying vec4 diffuse_term;
|
||||
varying vec3 normal;
|
||||
varying vec3 relPos;
|
||||
varying vec3 worldPos;
|
||||
varying vec2 rawPos;
|
||||
varying vec3 ecViewdir;
|
||||
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D overlay_texture;
|
||||
uniform sampler2D grain_texture;
|
||||
|
||||
varying float steepness;
|
||||
|
||||
|
||||
uniform float visibility;
|
||||
uniform float avisibility;
|
||||
uniform float scattering;
|
||||
uniform float terminator;
|
||||
uniform float terrain_alt;
|
||||
uniform float hazeLayerAltitude;
|
||||
uniform float overcast;
|
||||
uniform float eye_alt;
|
||||
uniform float snowlevel;
|
||||
uniform float dust_cover_factor;
|
||||
uniform float fogstructure;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float snow_thickness_factor;
|
||||
uniform float grit_alpha;
|
||||
uniform float overlay_bias;
|
||||
uniform float overlay_alpha;
|
||||
uniform float base_layer_magnification;
|
||||
uniform float overlay_layer_magnification;
|
||||
uniform float grain_layer_magnification;
|
||||
uniform float wetness;
|
||||
uniform float air_pollution;
|
||||
uniform float season;
|
||||
uniform float landing_light1_offset;
|
||||
uniform float landing_light2_offset;
|
||||
uniform float landing_light3_offset;
|
||||
|
||||
uniform int quality_level;
|
||||
uniform int tquality_level;
|
||||
uniform int cloud_shadow_flag;
|
||||
uniform int use_overlay;
|
||||
uniform int use_grain;
|
||||
uniform int use_color_overlay;
|
||||
uniform int use_searchlight;
|
||||
uniform int use_landing_light;
|
||||
uniform int use_alt_landing_light;
|
||||
|
||||
const float EarthRadius = 5800000.0;
|
||||
const float terminator_width = 200000.0;
|
||||
|
||||
|
||||
float alt;
|
||||
float eShade;
|
||||
float yprime_alt;
|
||||
float mie_angle;
|
||||
|
||||
float shadow_func (in float x, in float y, in float noise, in float dist);
|
||||
float Noise2D(in vec2 coord, in float wavelength);
|
||||
float Noise3D(in vec3 coord, in float wavelength);
|
||||
float fog_func (in float targ, in float alt);
|
||||
float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt);
|
||||
float alt_factor(in float eye_alt, in float vertex_alt);
|
||||
float light_distance_fading(in float dist);
|
||||
float fog_backscatter(in float avisibility);
|
||||
|
||||
vec3 rayleigh_out_shift(in vec3 color, in float outscatter);
|
||||
vec3 get_hazeColor(in float light_arg);
|
||||
vec3 searchlight();
|
||||
vec3 landing_light(in float offset, in float offsetv);
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
|
||||
float detail_fade (in float scale, in float angle, in float dist)
|
||||
{
|
||||
float fade_dist = 4000.0 * scale * angle;
|
||||
|
||||
return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist);
|
||||
}
|
||||
|
||||
|
||||
// this determines how light is attenuated in the distance
|
||||
// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff
|
||||
// for distance > visibility
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//if ((gl_FragCoord.y < ylimit) && (gl_FragCoord.x > zlimit1) && (gl_FragCoord.x < zlimit2))
|
||||
// {discard;}
|
||||
|
||||
|
||||
float effective_scattering = min(scattering, cloud_self_shading);
|
||||
yprime_alt = diffuse_term.a;
|
||||
//diffuse_term.a = 1.0;
|
||||
mie_angle = gl_Color.a;
|
||||
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
|
||||
float dist = length(relPos);
|
||||
float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
|
||||
|
||||
// this is taken from default.frag
|
||||
vec3 n;
|
||||
float NdotL, NdotHV, fogFactor;
|
||||
vec4 color = gl_Color;
|
||||
color.a = 1.0;
|
||||
vec3 lightDir = gl_LightSource[0].position.xyz;
|
||||
vec3 halfVector;
|
||||
if (quality_level<6)
|
||||
{halfVector = gl_LightSource[0].halfVector.xyz;}
|
||||
else
|
||||
{halfVector = normalize(normalize(lightDir) + normalize(ecViewdir));}
|
||||
vec4 texel;
|
||||
vec4 overlay_texel;
|
||||
vec4 grain_texel;
|
||||
vec4 snow_texel;
|
||||
vec4 fragColor;
|
||||
vec4 specular = vec4(0.0);
|
||||
float intensity;
|
||||
|
||||
|
||||
// get noise at different wavelengths
|
||||
|
||||
// used: 5m, 5m gradient, 10m, 10m gradient: heightmap of the closeup terrain, 10m also snow
|
||||
// 500m: distortion and overlay
|
||||
// 1500m: overlay, detail, dust, fog
|
||||
// 2000m: overlay, detail, snow, fog
|
||||
|
||||
float noise_01m;
|
||||
float noise_1m = Noise2D(rawPos.xy, 1.0);
|
||||
float noise_2m;
|
||||
|
||||
float noise_10m = Noise2D(rawPos.xy, 10.0);
|
||||
float noise_5m = Noise2D(rawPos.xy,5.0);
|
||||
|
||||
|
||||
|
||||
float noise_50m = Noise2D(rawPos.xy, 50.0);
|
||||
|
||||
float noise_1500m = Noise3D(worldPos.xyz, 1500.0);
|
||||
float noise_2000m = Noise3D(worldPos.xyz, 2000.0);
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
||||
|
||||
// get the texels
|
||||
|
||||
texel = texture2D(texture, gl_TexCoord[0].st * base_layer_magnification);
|
||||
float local_autumn_factor = texel.a;
|
||||
|
||||
float distortion_factor = 1.0;
|
||||
float noise_term;
|
||||
float snow_alpha;
|
||||
|
||||
if (quality_level > 3)
|
||||
{
|
||||
//snow_texel = texture2D(snow_texture, gl_TexCoord[0].st);
|
||||
|
||||
snow_texel = vec4 (0.95, 0.95, 0.95, 1.0) * (0.9 + 0.1* noise_50m + 0.1* (1.0 - noise_10m) );
|
||||
snow_texel.a = 1.0;
|
||||
noise_term = 0.1 * (noise_50m-0.5);
|
||||
|
||||
noise_term = noise_term + 0.2 * (noise_10m -0.5) * (1.0 - smoothstep(10000.0, 16000.0, dist) ) ;
|
||||
noise_term = noise_term + 0.3 * (noise_5m -0.5) * (1.0 - smoothstep(1200.0 , 2000.0 , dist) ) ;
|
||||
if (dist < 1000.0){ noise_term = noise_term + 0.3 * (noise_1m -0.5) * (1.0 - smoothstep(500.0 , 1000.0 , dist) );}
|
||||
snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) );
|
||||
}
|
||||
|
||||
if (use_overlay == 1)
|
||||
{
|
||||
overlay_texel = texture2D(overlay_texture, gl_TexCoord[0].st * overlay_layer_magnification);
|
||||
|
||||
texel.rgb = mix(texel.rgb, overlay_texel.rgb, overlay_texel.a * overlay_alpha * smoothstep(0.45, 0.65, overlay_bias + (0.5 * noise_1m + 0.1 * noise_2m + 0.4 * noise_10m)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (use_grain == 1)
|
||||
{
|
||||
grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * grain_layer_magnification);
|
||||
texel.rgb = mix(texel.rgb, grain_texel.rgb, grain_texel.a);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
float dist_fact;
|
||||
float nSum;
|
||||
float mix_factor;
|
||||
float water_factor = 0.0;
|
||||
float water_threshold1;
|
||||
float water_threshold2;
|
||||
|
||||
|
||||
// get distribution of water when terrain is wet
|
||||
|
||||
if ((dist < 3000.0)&& (quality_level > 3) && (wetness>0.0))
|
||||
{
|
||||
water_threshold1 = 1.0-0.5* wetness;
|
||||
water_threshold2 = 1.0 - 0.3 * wetness;
|
||||
water_factor = smoothstep(water_threshold1, water_threshold2 , 0.5 * (noise_5m + (1.0 -noise_1m))) * (1.0 - smoothstep(1000.0, 3000.0, dist));
|
||||
}
|
||||
|
||||
|
||||
// color and shade variation of the grass
|
||||
|
||||
if (use_color_overlay == 1)
|
||||
{
|
||||
float nfact_1m = 3.0 * (noise_1m - 0.5) * detail_fade(1.0, abs(ct),dist);//* (1.0 - smoothstep(3000.0, 6000.0, dist/ abs(ct)));
|
||||
float nfact_5m = 2.0 * (noise_5m - 0.5) * detail_fade(2.0, abs(ct),dist);;
|
||||
float nfact_10m = 1.0 * (noise_10m - 0.5);
|
||||
texel.rgb = texel.rgb * (0.85 + 0.1 * (nfact_1m * detail_fade(1.0, abs(ct),dist) + nfact_5m + nfact_10m) * grit_alpha);
|
||||
texel.r = texel.r * (1.0 + 0.14 * smoothstep(0.5,0.7, 0.33*(2.0 * noise_10m + (1.0-noise_5m))));
|
||||
}
|
||||
|
||||
|
||||
// autumn colors
|
||||
|
||||
float autumn_factor = season * 2.0 * (1.0 - local_autumn_factor) ;
|
||||
|
||||
|
||||
texel.r = min(1.0, (1.0 + 2.5 * autumn_factor) * texel.r);
|
||||
texel.g = texel.g;
|
||||
texel.b = max(0.0, (1.0 - 4.0 * autumn_factor) * texel.b);
|
||||
|
||||
|
||||
if (local_autumn_factor < 1.0)
|
||||
{
|
||||
intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season));
|
||||
texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season)));
|
||||
}
|
||||
|
||||
vec4 dust_color;
|
||||
|
||||
if (quality_level > 3)
|
||||
{
|
||||
// mix dust
|
||||
dust_color = vec4 (0.76, 0.71, 0.56, 1.0);
|
||||
texel = mix(texel, dust_color, clamp(0.5 * dust_cover_factor + 3.0 * dust_cover_factor * (((noise_1500m - 0.5) * 0.125)+0.125 ),0.0, 1.0) );
|
||||
|
||||
// mix snow
|
||||
snow_alpha = smoothstep(0.75, 0.85, abs(steepness));
|
||||
texel = mix(texel, snow_texel, snow_texel.a * smoothstep(snowlevel, snowlevel+200.0, snow_alpha * (relPos.z + eye_alt)+ (noise_2000m + 0.1 * noise_10m -0.55) *400.0));
|
||||
}
|
||||
|
||||
|
||||
// darken grass when wet
|
||||
texel.rgb = texel.rgb * (1.0 - 0.6 * wetness);
|
||||
|
||||
|
||||
|
||||
// light computations
|
||||
|
||||
|
||||
vec4 light_specular = gl_LightSource[0].specular ;
|
||||
|
||||
// If gl_Color.a == 0, this is a back-facing polygon and the
|
||||
// normal should be reversed.
|
||||
//n = (2.0 * gl_Color.a - 1.0) * normal;
|
||||
//n = normalize(n);
|
||||
n = normal;//vec3 (nvec.x, nvec.y, sqrt(1.0 -pow(nvec.x,2.0) - pow(nvec.y,2.0) ));
|
||||
n = normalize(n);
|
||||
|
||||
NdotL = dot(n, lightDir);
|
||||
if ((dist < 200.0) && (quality_level > 4))
|
||||
{
|
||||
noise_01m = Noise2D(rawPos.xy,0.1);
|
||||
NdotL = NdotL + 0.8 * (noise_01m-0.5) * grit_alpha * detail_fade(0.1, abs(ct),dist) * (1.0 - water_factor);
|
||||
}
|
||||
|
||||
if (NdotL > 0.0) {
|
||||
if (cloud_shadow_flag == 1)
|
||||
{NdotL = NdotL * shadow_func(relPos.x, relPos.y, noise_1500m, dist);}
|
||||
color += diffuse_term * NdotL;
|
||||
|
||||
|
||||
|
||||
|
||||
NdotHV = max(dot(n, halfVector), 0.0);
|
||||
|
||||
if (gl_FrontMaterial.shininess > 0.0)
|
||||
specular.rgb = ((gl_FrontMaterial.specular.rgb + (water_factor * vec3 (1.0, 1.0, 1.0)))
|
||||
* light_specular.rgb
|
||||
* pow(NdotHV, (gl_FrontMaterial.shininess + 20.0 * water_factor)));
|
||||
}
|
||||
color.a = 1.0;
|
||||
// This shouldn't be necessary, but our lighting becomes very
|
||||
// saturated. Clamping the color before modulating by the texture
|
||||
// is closer to what the OpenGL fixed function pipeline does.
|
||||
color = clamp(color, 0.0, 1.0);
|
||||
|
||||
|
||||
|
||||
vec3 secondary_light = vec3 (0.0,0.0,0.0);
|
||||
|
||||
if (use_searchlight == 1)
|
||||
{
|
||||
secondary_light += searchlight();
|
||||
}
|
||||
if (use_landing_light == 1)
|
||||
{
|
||||
secondary_light += landing_light(landing_light1_offset, landing_light3_offset);
|
||||
}
|
||||
if (use_alt_landing_light == 1)
|
||||
{
|
||||
secondary_light += landing_light(landing_light2_offset, landing_light3_offset);
|
||||
}
|
||||
color.rgb +=secondary_light * light_distance_fading(dist);
|
||||
|
||||
fragColor = color * texel + specular;
|
||||
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
vec3 hazeColor = get_hazeColor(lightArg);
|
||||
|
||||
|
||||
// Rayleigh color shift due to out-scattering
|
||||
|
||||
if ((quality_level > 5) && (tquality_level > 5))
|
||||
{
|
||||
float rayleigh_length = 0.5 * avisibility * (2.5 - 1.9 * air_pollution)/alt_factor(eye_alt, eye_alt+relPos.z);
|
||||
float outscatter = 1.0-exp(-dist/rayleigh_length);
|
||||
fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter);
|
||||
// Rayleigh color shift due to in-scattering
|
||||
float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt + 420000.0);
|
||||
float lightIntensity = length(hazeColor * effective_scattering) * rShade;
|
||||
vec3 rayleighColor = vec3 (0.17, 0.52, 0.87) * lightIntensity;
|
||||
float rayleighStrength = rayleigh_in_func(dist, air_pollution, avisibility/max(lightIntensity,0.05), eye_alt, eye_alt + relPos.z);
|
||||
fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength);
|
||||
}
|
||||
|
||||
|
||||
// here comes the terrain haze model
|
||||
|
||||
|
||||
float delta_z = hazeLayerAltitude - eye_alt;
|
||||
float mvisibility = min(visibility,avisibility);
|
||||
|
||||
if (dist > 0.04 * mvisibility)
|
||||
{
|
||||
|
||||
alt = eye_alt;
|
||||
|
||||
|
||||
float transmission;
|
||||
float vAltitude;
|
||||
float delta_zv;
|
||||
float H;
|
||||
float distance_in_layer;
|
||||
float transmission_arg;
|
||||
|
||||
|
||||
|
||||
|
||||
// we solve the geometry what part of the light path is attenuated normally and what is through the haze layer
|
||||
|
||||
if (delta_z > 0.0) // we're inside the layer
|
||||
{
|
||||
if (ct < 0.0) // we look down
|
||||
{
|
||||
distance_in_layer = dist;
|
||||
vAltitude = min(distance_in_layer,mvisibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
else // we may look through upper layer edge
|
||||
{
|
||||
H = dist * ct;
|
||||
if (H > delta_z) {distance_in_layer = dist/H * delta_z;}
|
||||
else {distance_in_layer = dist;}
|
||||
vAltitude = min(distance_in_layer,visibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
}
|
||||
else // we see the layer from above, delta_z < 0.0
|
||||
{
|
||||
H = dist * -ct;
|
||||
if (H < (-delta_z)) // we don't see into the layer at all, aloft visibility is the only fading
|
||||
{
|
||||
distance_in_layer = 0.0;
|
||||
delta_zv = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vAltitude = H + delta_z;
|
||||
distance_in_layer = vAltitude/H * dist;
|
||||
vAltitude = min(distance_in_layer,visibility) * (-ct);
|
||||
delta_zv = vAltitude;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ground haze cannot be thinner than aloft visibility in the model,
|
||||
// so we need to use aloft visibility otherwise
|
||||
|
||||
|
||||
transmission_arg = (dist-distance_in_layer)/avisibility;
|
||||
|
||||
|
||||
float eqColorFactor;
|
||||
|
||||
|
||||
|
||||
if (visibility < avisibility)
|
||||
{
|
||||
if (quality_level > 3)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility + 1.0 * visibility * fogstructure * 0.06 * (noise_1500m + noise_2000m -1.0) ));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/visibility);
|
||||
}
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 - effective_scattering);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (quality_level > 3)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility + 1.0 * avisibility * fogstructure * 0.06 * (noise_1500m + noise_2000m - 1.0) ));
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/avisibility);
|
||||
}
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 - effective_scattering);
|
||||
}
|
||||
|
||||
|
||||
|
||||
transmission = fog_func(transmission_arg, alt);
|
||||
|
||||
// there's always residual intensity, we should never be driven to zero
|
||||
if (eqColorFactor < 0.2) eqColorFactor = 0.2;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// now dim the light for haze
|
||||
eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt);
|
||||
|
||||
// Mie-like factor
|
||||
|
||||
if (lightArg < 10.0)
|
||||
{intensity = length(hazeColor);
|
||||
float mie_magnitude = 0.5 * smoothstep(350000.0, 150000.0, terminator-sqrt(2.0 * EarthRadius * terrain_alt));
|
||||
hazeColor = intensity * ((1.0 - mie_magnitude) + mie_magnitude * mie_angle) * normalize(mix(hazeColor, vec3 (0.5, 0.58, 0.65), mie_magnitude * (0.5 - 0.5 * mie_angle)) );
|
||||
}
|
||||
|
||||
// high altitude desaturation of the haze color
|
||||
|
||||
intensity = length(hazeColor);
|
||||
|
||||
if (intensity>0.0)
|
||||
{
|
||||
|
||||
hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, alt)));
|
||||
|
||||
// blue hue of haze
|
||||
|
||||
hazeColor.x = hazeColor.x * 0.83;
|
||||
hazeColor.y = hazeColor.y * 0.9;
|
||||
|
||||
|
||||
// additional blue in indirect light
|
||||
float fade_out = max(0.65 - 0.3 *overcast, 0.45);
|
||||
intensity = length(hazeColor);
|
||||
hazeColor = intensity * normalize(mix(hazeColor, 1.5* shadedFogColor, 1.0 -smoothstep(0.25, fade_out,eShade) ));
|
||||
|
||||
|
||||
// change haze color to blue hue for strong fogging
|
||||
hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor))));
|
||||
|
||||
// reduce haze intensity when looking at shaded surfaces, only in terminator region
|
||||
|
||||
float shadow = mix( min(1.0 + dot(n,lightDir),1.0), 1.0, 1.0-smoothstep(0.1, 0.4, transmission));
|
||||
hazeColor = mix(shadow * hazeColor, hazeColor, 0.3 + 0.7* smoothstep(250000.0, 400000.0, terminator));
|
||||
}
|
||||
|
||||
|
||||
//hazeColor = clamp(hazeColor,0.0,1.0);
|
||||
|
||||
// don't let the light fade out too rapidly
|
||||
lightArg = (terminator + 200000.0)/100000.0;
|
||||
float minLightIntensity = min(0.2,0.16 * lightArg + 0.5);
|
||||
vec3 minLight = minLightIntensity * vec3 (0.2, 0.3, 0.4);
|
||||
|
||||
hazeColor.rgb *= eqColorFactor * eShade;
|
||||
hazeColor.rgb = max(hazeColor.rgb, minLight.rgb);
|
||||
|
||||
|
||||
fragColor.rgb = mix(hazeColor+secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||
|
||||
gl_FragColor = fragColor;
|
||||
|
||||
|
||||
}
|
207
Compositor/Shaders/ALS/birds.frag
Normal file
207
Compositor/Shaders/ALS/birds.frag
Normal file
|
@ -0,0 +1,207 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform sampler2D texture;
|
||||
|
||||
uniform float color_base_r;
|
||||
uniform float color_base_g;
|
||||
uniform float color_base_b;
|
||||
|
||||
uniform float color_alt_r;
|
||||
uniform float color_alt_g;
|
||||
uniform float color_alt_b;
|
||||
|
||||
uniform float visibility;
|
||||
uniform float avisibility;
|
||||
uniform float hazeLayerAltitude;
|
||||
uniform float eye_alt;
|
||||
uniform float terminator;
|
||||
uniform float scattering;
|
||||
|
||||
uniform float osg_SimulationTime;
|
||||
|
||||
|
||||
varying vec3 vertex;
|
||||
varying vec3 relPos;
|
||||
varying vec3 normal;
|
||||
|
||||
const float terminator_width = 200000.0;
|
||||
|
||||
float Noise2D(in vec2 coord, in float wavelength);
|
||||
float VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand);
|
||||
float fog_func (in float targ, in float alt);
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
//x = x - 0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x < -15.0) {return 0.0;}
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
float noise = 0.0;
|
||||
|
||||
|
||||
vec3 color_base = vec3 (color_base_r, color_base_g, color_base_b);
|
||||
vec3 color_alt = vec3 (color_alt_r, color_alt_g, color_alt_b);
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
|
||||
|
||||
vec3 viewDir = normalize(relPos);
|
||||
|
||||
|
||||
vec2 lookup_coords = vertex.yz;
|
||||
lookup_coords.x += 0.03* osg_SimulationTime;
|
||||
|
||||
float domain_size = 0.05;
|
||||
float r = length(vertex);
|
||||
|
||||
float domain_noise = VoronoiNoise2D(lookup_coords, domain_size, 0.0, 0.0);
|
||||
domain_noise = domain_noise * (1.0- smoothstep(0.5, 1.0, r));
|
||||
|
||||
if (domain_noise < 0.9) {discard;}
|
||||
|
||||
|
||||
|
||||
// fogging
|
||||
|
||||
float dist = length(relPos);
|
||||
float delta_z = hazeLayerAltitude - eye_alt;
|
||||
float transmission;
|
||||
float vAltitude;
|
||||
float delta_zv;
|
||||
float H;
|
||||
float distance_in_layer;
|
||||
float transmission_arg;
|
||||
|
||||
// angle with horizon
|
||||
float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
|
||||
|
||||
|
||||
if (delta_z > 0.0) // we're inside the layer
|
||||
{
|
||||
if (ct < 0.0) // we look down
|
||||
{
|
||||
distance_in_layer = dist;
|
||||
vAltitude = min(distance_in_layer,min(visibility, avisibility)) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
else // we may look through upper layer edge
|
||||
{
|
||||
H = dist * ct;
|
||||
if (H > delta_z) {distance_in_layer = dist/H * delta_z;}
|
||||
else {distance_in_layer = dist;}
|
||||
vAltitude = min(distance_in_layer,visibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
}
|
||||
else // we see the layer from above, delta_z < 0.0
|
||||
{
|
||||
H = dist * -ct;
|
||||
if (H < (-delta_z))
|
||||
{
|
||||
distance_in_layer = 0.0;
|
||||
delta_zv = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vAltitude = H + delta_z;
|
||||
distance_in_layer = vAltitude/H * dist;
|
||||
vAltitude = min(distance_in_layer,visibility) * (-ct);
|
||||
delta_zv = vAltitude;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
transmission_arg = (dist-distance_in_layer)/avisibility;
|
||||
if (visibility < avisibility)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/visibility);
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/avisibility);
|
||||
}
|
||||
|
||||
|
||||
|
||||
transmission = fog_func(transmission_arg, 0.0);
|
||||
float lightArg = terminator/100000.0;
|
||||
float earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, 0.0)) + 0.4;
|
||||
|
||||
vec4 light_diffuse;
|
||||
|
||||
|
||||
light_diffuse.b = light_func(lightArg , 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0);
|
||||
light_diffuse.g = light_func(lightArg , 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
light_diffuse.a = 1.0;
|
||||
|
||||
light_diffuse *=scattering;
|
||||
|
||||
|
||||
float intensity = length(light_diffuse.rgb);
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) ));
|
||||
|
||||
|
||||
vec4 domainTexel;
|
||||
|
||||
|
||||
if (domain_noise > 0.9) {domainTexel = vec4 (1.0, 1.0, 1.0, 1.0);}
|
||||
else {domainTexel = vec4 (0.0, 0.0, 0.0, 0.0);}
|
||||
|
||||
|
||||
|
||||
vec2 coords_raw = lookup_coords/domain_size;
|
||||
coords_raw += vec2(0.5,0.5);
|
||||
float coord_int_x = coords_raw.x - fract(coords_raw.x) ;
|
||||
float coord_int_y = coords_raw.y - fract(coords_raw.y) ;
|
||||
|
||||
vec2 domain_coords = vec2 (coords_raw.x - coord_int_x, coords_raw.y - coord_int_y);
|
||||
|
||||
float domain_x = coords_raw.x - coord_int_x;
|
||||
|
||||
domain_coords.y = clamp(domain_coords.y, 0.05, 0.95);
|
||||
|
||||
domain_coords.x *=0.25;
|
||||
|
||||
float shape_select = 0.0;
|
||||
|
||||
if (domain_noise > 0.975) {shape_select = 0.25;}
|
||||
else if (domain_noise > 0.95) {shape_select = 0.5;}
|
||||
else if (domain_noise > 0.925) {shape_select = 0.75;}
|
||||
|
||||
float t_fact = fract(osg_SimulationTime);
|
||||
|
||||
if (t_fact > 0.75) {shape_select +=0.75;}
|
||||
else if (t_fact > 0.5) {shape_select +=0.5;}
|
||||
else if (t_fact > 0.25) {shape_select +=0.25;}
|
||||
|
||||
|
||||
domain_coords.x += shape_select;
|
||||
|
||||
vec4 shapeTexel = texture2D(texture, domain_coords);
|
||||
|
||||
color_base.rgb = mix(color_alt.rgb, color_base.rgb, length(shapeTexel.rgb)/1.73);
|
||||
|
||||
if ((domain_coords.y < 0.1) || (domain_coords.y > 0.9)) {shapeTexel.a = 0.0;}
|
||||
if ((domain_x < 0.1) || (domain_x > 0.9)) {shapeTexel.a = 0.0;}
|
||||
|
||||
domainTexel.rgb *= color_base.rgb;
|
||||
|
||||
vec4 birdTexel;
|
||||
birdTexel.rgb = domainTexel.rgb * light_diffuse.rgb;
|
||||
birdTexel.a = domainTexel.a * shapeTexel.a * transmission;
|
||||
|
||||
|
||||
gl_FragColor = birdTexel;
|
||||
|
||||
|
||||
}
|
48
Compositor/Shaders/ALS/birds.vert
Normal file
48
Compositor/Shaders/ALS/birds.vert
Normal file
|
@ -0,0 +1,48 @@
|
|||
// -*-C++-*-
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
|
||||
varying vec3 vertex;
|
||||
varying vec3 relPos;
|
||||
varying vec3 normal;
|
||||
|
||||
uniform float osg_SimulationTime;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
|
||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
||||
vec3 u = normalize(ep.xyz - l.xyz);
|
||||
|
||||
vec3 absu = abs(u);
|
||||
vec3 r = normalize(vec3(-u.y, u.x, 0.0));
|
||||
vec3 w = cross(u, r);
|
||||
|
||||
vertex = gl_Vertex.xyz;
|
||||
relPos = vertex - ep.xyz;
|
||||
normal = gl_NormalMatrix * gl_Normal;
|
||||
|
||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
gl_Position.xyz = gl_Vertex.x * u;
|
||||
gl_Position.xyz += gl_Vertex.y * r;
|
||||
gl_Position.xyz += gl_Vertex.z * w;
|
||||
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
|
||||
|
||||
//vec4 offset = gl_ModelViewProjectionMatrix * vec4 (0.05* osg_SimulationTime, 0.0, 0.0, 1.0);
|
||||
|
||||
//gl_Position +=offset;
|
||||
|
||||
//gl_Position = ftransform();
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
|
||||
gl_FrontColor = vec4 (1.0,1.0,1.0,1.0);
|
||||
gl_BackColor = gl_FrontColor;
|
||||
}
|
||||
|
||||
|
444
Compositor/Shaders/ALS/bowwave.frag
Normal file
444
Compositor/Shaders/ALS/bowwave.frag
Normal file
|
@ -0,0 +1,444 @@
|
|||
// This shader is mostly an adaptation of the shader found at
|
||||
// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
|
||||
// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
|
||||
// © Michael Horsch - 2005
|
||||
// Major update and revisions - 2011-10-07
|
||||
// © Emilian Huminiuc and Vivian Meazza
|
||||
// Optimisation - 2012-5-05
|
||||
// © Emilian Huminiuc and Vivian Meazza
|
||||
// Ported to the Atmospheric Light Scattering Framework
|
||||
// by Thorsten Renk, Aug. 2013
|
||||
|
||||
#version 120
|
||||
#define fps2kts 0.5925
|
||||
|
||||
uniform sampler2D water_normalmap;
|
||||
uniform sampler2D water_reflection;
|
||||
uniform sampler2D water_dudvmap;
|
||||
uniform sampler2D water_reflection_grey;
|
||||
uniform sampler2D sea_foam;
|
||||
uniform sampler2D alpha_tex;
|
||||
uniform sampler2D bowwave_nmap;
|
||||
|
||||
uniform float saturation, Overcast, WindE, WindN, spd, hdg;
|
||||
uniform float CloudCover0, CloudCover1, CloudCover2, CloudCover3, CloudCover4;
|
||||
uniform int Status;
|
||||
|
||||
uniform float hazeLayerAltitude;
|
||||
uniform float terminator;
|
||||
uniform float terrain_alt;
|
||||
uniform float avisibility;
|
||||
uniform float visibility;
|
||||
uniform float overcast;
|
||||
uniform float scattering;
|
||||
uniform float ground_scattering;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float eye_alt;
|
||||
uniform float fogstructure;
|
||||
uniform float ice_cover;
|
||||
uniform float sea_r;
|
||||
uniform float sea_g;
|
||||
uniform float sea_b;
|
||||
|
||||
uniform int quality_level;
|
||||
|
||||
|
||||
varying vec4 waterTex1; //moving texcoords
|
||||
varying vec4 waterTex2; //moving texcoords
|
||||
varying vec3 viewerdir;
|
||||
varying vec3 lightdir;
|
||||
varying vec3 normal;
|
||||
varying vec3 relPos;
|
||||
varying float earthShade;
|
||||
varying float yprime_alt;
|
||||
varying float mie_angle;
|
||||
varying float steepness;
|
||||
|
||||
vec3 specular_light;
|
||||
|
||||
float fog_func (in float targ, in float alt);
|
||||
|
||||
vec3 get_hazeColor(in float light_arg);
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
const float terminator_width = 200000.0;
|
||||
const float EarthRadius = 5800000.0;
|
||||
|
||||
|
||||
/////// functions /////////
|
||||
|
||||
float normalize_range(float _val)
|
||||
{
|
||||
if (_val > 180.0)
|
||||
return _val - 360.0;
|
||||
else
|
||||
return _val;
|
||||
}
|
||||
|
||||
|
||||
void relWind(out float rel_wind_speed_kts, out float rel_wind_from_rad)
|
||||
{
|
||||
//calculate the carrier speed north and east in kts
|
||||
float speed_north_kts = cos(radians(hdg)) * spd ;
|
||||
float speed_east_kts = sin(radians(hdg)) * spd ;
|
||||
|
||||
//calculate the relative wind speed north and east in kts
|
||||
float rel_wind_speed_from_east_kts = WindE*fps2kts + speed_east_kts;
|
||||
float rel_wind_speed_from_north_kts = WindN*fps2kts + speed_north_kts;
|
||||
|
||||
//combine relative speeds north and east to get relative windspeed in kts
|
||||
rel_wind_speed_kts = sqrt(rel_wind_speed_from_east_kts*rel_wind_speed_from_east_kts
|
||||
+ rel_wind_speed_from_north_kts*rel_wind_speed_from_north_kts);
|
||||
|
||||
//calculate the relative wind direction
|
||||
float rel_wind_from_deg = degrees(atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts));
|
||||
// rel_wind_from_rad = atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts);
|
||||
float rel_wind = rel_wind_from_deg - hdg;
|
||||
rel_wind = normalize_range(rel_wind);
|
||||
rel_wind_from_rad = radians(rel_wind);
|
||||
}
|
||||
|
||||
void rotationmatrix(in float angle, out mat4 rotmat)
|
||||
{
|
||||
rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
|
||||
sin( angle ), cos( angle ), 0.0, 0.0,
|
||||
0.0 , 0.0 , 1.0, 0.0,
|
||||
0.0 , 0.0 , 0.0, 1.0 );
|
||||
}
|
||||
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
x = x - 0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x > 30.0) {return e;}
|
||||
if (x < -15.0) {return 0.0;}
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
// this determines how light is attenuated in the distance
|
||||
// physically this should be exp(-arg) but for technical reasons we use a sharper cutoff
|
||||
// for distance > visibility
|
||||
|
||||
|
||||
|
||||
//////////////////////
|
||||
|
||||
void main(void)
|
||||
{
|
||||
const vec4 sca = vec4(0.005, 0.005, 0.005, 0.005);
|
||||
const vec4 sca2 = vec4(0.02, 0.02, 0.02, 0.02);
|
||||
const vec4 tscale = vec4(0.25, 0.25, 0.25, 0.25);
|
||||
|
||||
mat4 RotationMatrix;
|
||||
|
||||
float relWindspd=0;
|
||||
float relWinddir=0;
|
||||
|
||||
float dist = length(relPos);
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
float effective_scattering = min(scattering, cloud_self_shading);
|
||||
|
||||
// compute relative wind speed and direction
|
||||
relWind (relWindspd, relWinddir);
|
||||
|
||||
rotationmatrix(relWinddir, RotationMatrix);
|
||||
|
||||
// compute direction to viewer
|
||||
vec3 E = normalize(viewerdir);
|
||||
|
||||
// compute direction to light source
|
||||
vec3 L = normalize(lightdir);
|
||||
|
||||
// half vector
|
||||
vec3 H = normalize(L + E);
|
||||
|
||||
const float water_shininess = 240.0;
|
||||
// approximate cloud cover
|
||||
float cover = 0.0;
|
||||
//bool Status = true;
|
||||
|
||||
float windEffect = relWindspd; //wind speed in kt
|
||||
// float windEffect = sqrt(pow(abs(WindE),2)+pow(abs(WindN),2)) * 0.6; //wind speed in kt
|
||||
float windScale = 15.0/(5.0 + windEffect); //wave scale
|
||||
float waveRoughness = 0.05 + smoothstep(0.0, 50.0, windEffect); //wave roughness filter
|
||||
|
||||
|
||||
if (Status == 1){
|
||||
cover = min(min(min(min(CloudCover0, CloudCover1),CloudCover2),CloudCover3),CloudCover4);
|
||||
} else {
|
||||
// hack to allow for Overcast not to be set by Local Weather
|
||||
|
||||
if (Overcast == 0){
|
||||
cover = 5;
|
||||
} else {
|
||||
cover = Overcast * 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//vec4 viewt = normalize(waterTex4);
|
||||
vec4 viewt = vec4(-E, 0.0) * 0.6;
|
||||
|
||||
vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale * 2.0) * 2.0 - 1.0;
|
||||
vec4 dist1 = texture2D(water_dudvmap, vec2(waterTex1 + disdis*sca2)* windScale * 2.0) * 2.0 - 1.0;
|
||||
vec4 fdist = normalize(dist1);
|
||||
fdist = -fdist;
|
||||
fdist *= sca;
|
||||
|
||||
//normalmap
|
||||
rotationmatrix(-relWinddir, RotationMatrix);
|
||||
|
||||
vec4 nmap0 = texture2D(water_normalmap, vec2((waterTex1 + disdis*sca2) * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0;
|
||||
vec4 nmap2 = texture2D(water_normalmap, vec2(waterTex2 * tscale * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0;
|
||||
vec4 nmap3 = texture2D(bowwave_nmap, gl_TexCoord[0].st) * 2.0 - 1.0;
|
||||
vec4 vNorm = normalize(mix(nmap3, nmap0 + nmap2, 0.3 )* waveRoughness);
|
||||
vNorm = -vNorm;
|
||||
|
||||
//load reflection
|
||||
vec4 tmp = vec4(lightdir, 0.0);
|
||||
vec4 refTex = texture2D(water_reflection, vec2(tmp + waterTex1) * 32.0) ;
|
||||
vec4 refTexGrey = texture2D(water_reflection_grey, vec2(tmp + waterTex1) * 32.0) ;
|
||||
vec4 refl ;
|
||||
// cover = 0;
|
||||
|
||||
/*if(cover >= 1.5){
|
||||
refl= normalize(refTex);
|
||||
}
|
||||
else
|
||||
{
|
||||
refl = normalize(refTexGrey);
|
||||
refl.r *= (0.75 + 0.15 * cover);
|
||||
refl.g *= (0.80 + 0.15 * cover);
|
||||
refl.b *= (0.875 + 0.125 * cover);
|
||||
refl.a *= 1.0;
|
||||
}
|
||||
*/
|
||||
|
||||
refl.r = sea_r;
|
||||
refl.g = sea_g;
|
||||
refl.b = sea_b;
|
||||
refl.a = 1.0;
|
||||
|
||||
|
||||
float intensity;
|
||||
// de-saturate for reduced light
|
||||
refl.rgb = mix(refl.rgb, vec3 (0.248, 0.248, 0.248), 1.0 - smoothstep(0.1, 0.8, ground_scattering));
|
||||
|
||||
// de-saturate light for overcast haze
|
||||
intensity = length(refl.rgb);
|
||||
refl.rgb = mix(refl.rgb, intensity * vec3 (1.0, 1.0, 1.0), 0.5 * smoothstep(0.1, 0.9, overcast));
|
||||
|
||||
vec3 N0 = vec3(texture2D(water_normalmap, vec2((waterTex1 + disdis*sca2)* RotationMatrix) * windScale * 2.0) * 2.0 - 1.0);
|
||||
vec3 N1 = vec3(texture2D(water_normalmap, vec2(waterTex2 * tscale * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0);
|
||||
vec3 N2 = vec3(texture2D(bowwave_nmap, gl_TexCoord[0].st)*2.0-1.0);
|
||||
//vec3 Nf = normalize((normal+N0+N1)*waveRoughness);
|
||||
vec3 N = normalize(mix(normal+N2, normal+N0+N1, 0.3)* waveRoughness);
|
||||
N = -N;
|
||||
|
||||
// specular
|
||||
|
||||
specular_light = gl_Color.rgb;
|
||||
|
||||
vec3 specular_color = vec3(specular_light)
|
||||
* pow(max(0.0, dot(N, H)), water_shininess) * 6.0;
|
||||
vec4 specular = vec4(specular_color, 0.5);
|
||||
|
||||
specular = specular * saturation * 0.3;
|
||||
|
||||
//calculate fresnel
|
||||
vec4 invfres = vec4( dot(vNorm, viewt) );
|
||||
vec4 fres = vec4(1.0) + invfres;
|
||||
refl *= fres;
|
||||
|
||||
vec4 alpha0 = texture2D(alpha_tex, gl_TexCoord[0].st);
|
||||
|
||||
//calculate final colour
|
||||
vec4 ambient_light;
|
||||
ambient_light.rgb = max(specular_light.rgb, vec3(0.1, 0.1, 0.1));
|
||||
ambient_light.a = 1.0;
|
||||
vec4 finalColor;
|
||||
|
||||
finalColor = refl + specular * smoothstep(0.3, 0.6, ground_scattering);
|
||||
|
||||
//add foam
|
||||
|
||||
float foamSlope = 0.05 + 0.01 * windScale;
|
||||
//float waveSlope = mix(N0.g, N1.g, 0.25);
|
||||
|
||||
vec4 foam_texel = texture2D(sea_foam, vec2(waterTex2 * tscale) * 50.0);
|
||||
float waveSlope = N.g;
|
||||
|
||||
if (windEffect >= 12.0)
|
||||
if (waveSlope >= foamSlope){
|
||||
finalColor = mix(finalColor, max(finalColor, finalColor + foam_texel), smoothstep(foamSlope, 0.5, N.g));
|
||||
}
|
||||
|
||||
//generate final colour
|
||||
finalColor *= ambient_light;//+ alpha0 * 0.35;
|
||||
|
||||
|
||||
|
||||
float delta_z = hazeLayerAltitude - eye_alt;
|
||||
|
||||
|
||||
if (dist > 40.0)
|
||||
{
|
||||
|
||||
|
||||
float transmission;
|
||||
float vAltitude;
|
||||
float delta_zv;
|
||||
float H;
|
||||
float distance_in_layer;
|
||||
float transmission_arg;
|
||||
|
||||
|
||||
// angle with horizon
|
||||
float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
|
||||
|
||||
// we solve the geometry what part of the light path is attenuated normally and what is through the haze layer
|
||||
|
||||
|
||||
if (delta_z > 0.0) // we're inside the layer
|
||||
{
|
||||
if (ct < 0.0) // we look down
|
||||
{
|
||||
distance_in_layer = dist;
|
||||
vAltitude = min(distance_in_layer,min(visibility,avisibility)) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
else // we may look through upper layer edge
|
||||
{
|
||||
H = dist * ct;
|
||||
if (H > delta_z) {distance_in_layer = dist/H * delta_z;}
|
||||
else {distance_in_layer = dist;}
|
||||
vAltitude = min(distance_in_layer,visibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
}
|
||||
else // we see the layer from above, delta_z < 0.0
|
||||
{
|
||||
H = dist * -ct;
|
||||
if (H < (-delta_z)) // we don't see into the layer at all, aloft visibility is the only fading
|
||||
{
|
||||
distance_in_layer = 0.0;
|
||||
delta_zv = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vAltitude = H + delta_z;
|
||||
distance_in_layer = vAltitude/H * dist;
|
||||
vAltitude = min(distance_in_layer,visibility) * (-ct);
|
||||
delta_zv = vAltitude;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ground haze cannot be thinner than aloft visibility in the model,
|
||||
// so we need to use aloft visibility otherwise
|
||||
|
||||
transmission_arg = (dist-distance_in_layer)/avisibility;
|
||||
|
||||
|
||||
float eqColorFactor;
|
||||
|
||||
|
||||
if (visibility < avisibility)
|
||||
{
|
||||
if (quality_level > 3)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility ));
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/visibility);
|
||||
}
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 -effective_scattering);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (quality_level > 3)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility ));
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/avisibility);
|
||||
}
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 -effective_scattering);
|
||||
}
|
||||
|
||||
|
||||
transmission = fog_func(transmission_arg, eye_alt);
|
||||
|
||||
// there's always residual intensity, we should never be driven to zero
|
||||
if (eqColorFactor < 0.2) eqColorFactor = 0.2;
|
||||
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
vec3 hazeColor = get_hazeColor(lightArg);
|
||||
|
||||
|
||||
// now dim the light for haze
|
||||
float eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt);
|
||||
|
||||
|
||||
// Mie-like factor
|
||||
|
||||
if (lightArg < 10.0)
|
||||
{intensity = length(hazeColor);
|
||||
float mie_magnitude = 0.5 * smoothstep(350000.0, 150000.0, terminator-sqrt(2.0 * EarthRadius * terrain_alt));
|
||||
hazeColor = intensity * ((1.0 - mie_magnitude) + mie_magnitude * mie_angle) * normalize(mix(hazeColor, vec3 (0.5, 0.58, 0.65), mie_magnitude * (0.5 - 0.5 * mie_angle)) );
|
||||
}
|
||||
|
||||
// high altitude desaturation of the haze color
|
||||
|
||||
intensity = length(hazeColor);
|
||||
|
||||
|
||||
if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColor doesn't come out correctly
|
||||
{
|
||||
hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, eye_alt)));
|
||||
|
||||
// blue hue of haze
|
||||
|
||||
hazeColor.x = hazeColor.x * 0.83;
|
||||
hazeColor.y = hazeColor.y * 0.9;
|
||||
|
||||
|
||||
// additional blue in indirect light
|
||||
float fade_out = max(0.65 - 0.3 *overcast, 0.45);
|
||||
intensity = length(hazeColor);
|
||||
hazeColor = intensity * normalize(mix(hazeColor, 1.5* shadedFogColor, 1.0 -smoothstep(0.25, fade_out,eShade) ));
|
||||
|
||||
// change haze color to blue hue for strong fogging
|
||||
hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor))));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// don't let the light fade out too rapidly
|
||||
lightArg = (terminator + 200000.0)/100000.0;
|
||||
float minLightIntensity = min(0.2,0.16 * lightArg + 0.5);
|
||||
vec3 minLight = minLightIntensity * vec3 (0.2, 0.3, 0.4);
|
||||
|
||||
hazeColor.rgb *= eqColorFactor * eShade;
|
||||
hazeColor.rgb = max(hazeColor.rgb, minLight.rgb);
|
||||
|
||||
finalColor.rgb = mix(hazeColor, finalColor.rgb,transmission);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
finalColor.rgb = filter_combined(finalColor.rgb);
|
||||
gl_FragColor = vec4(finalColor.rgb, alpha0.a * 1.35);
|
||||
|
||||
|
||||
}
|
159
Compositor/Shaders/ALS/building-model-ultra.vert
Normal file
159
Compositor/Shaders/ALS/building-model-ultra.vert
Normal file
|
@ -0,0 +1,159 @@
|
|||
// -*- mode: C; -*-
|
||||
// Licence: GPL v2
|
||||
// © Emilian Huminiuc and Vivian Meazza 2011
|
||||
#version 120
|
||||
|
||||
attribute vec3 instancePosition; // (x,y,z)
|
||||
attribute vec3 instanceScaleRotate; // (width, depth, height)
|
||||
attribute vec3 rotPitchWtex0x; // (rotation, pitch height, texture x offset)
|
||||
attribute vec3 wtex0yTex1xTex1y; // (wall texture y offset, wall/roof texture x gain, wall/roof texture y gain)
|
||||
attribute vec3 rtex0xRtex0y; // (roof texture y offset, roof texture x gain, texture y gain)
|
||||
attribute vec3 rooftopscale; // (rooftop x scale, rooftop y scale)
|
||||
|
||||
varying vec3 rawpos;
|
||||
varying vec3 VNormal;
|
||||
varying vec3 VTangent;
|
||||
varying vec3 VBinormal;
|
||||
varying vec3 vViewVec;
|
||||
varying vec3 vertVec;
|
||||
varying vec3 reflVec;
|
||||
|
||||
varying float alpha;
|
||||
|
||||
attribute vec3 tangent;
|
||||
attribute vec3 binormal;
|
||||
|
||||
uniform float pitch;
|
||||
uniform float roll;
|
||||
uniform float hdg;
|
||||
uniform int refl_dynamic;
|
||||
uniform int nmap_enabled;
|
||||
uniform int shader_qual;
|
||||
uniform int rembrandt_enabled;
|
||||
uniform int color_is_position;
|
||||
|
||||
//////Fog Include///////////
|
||||
// uniform int fogType;
|
||||
// void fog_Func(int type);
|
||||
////////////////////////////
|
||||
|
||||
void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat)
|
||||
{
|
||||
rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0,
|
||||
0.0 , cosRx , -sinRx * cosRx, 0.0,
|
||||
-sinRy, sinRx * cosRy, cosRx * cosRy , 0.0,
|
||||
0.0 , 0.0 , 0.0 , 1.0 );
|
||||
}
|
||||
|
||||
void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat)
|
||||
{
|
||||
rotmat = mat4( cosRz, -sinRz, 0.0, 0.0,
|
||||
sinRz, cosRz, 0.0, 0.0,
|
||||
0.0 , 0.0 , 1.0, 0.0,
|
||||
0.0 , 0.0 , 0.0, 1.0 );
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
// Determine the rotation for the building.
|
||||
float sr = sin(6.28 * rotPitchWtex0x.x);
|
||||
float cr = cos(6.28 * rotPitchWtex0x.x);
|
||||
|
||||
|
||||
vec3 rawpos = gl_Vertex.xyz;
|
||||
// Adjust the very top of the roof to match the rooftop scaling. This shapes
|
||||
// the rooftop - gambled, gabled etc. These vertices are identified by gl_Color.z
|
||||
rawpos.x = (1.0 - gl_Color.z) * rawpos.x + gl_Color.z * ((rawpos.x + 0.5) * rooftopscale.x - 0.5);
|
||||
rawpos.y = (1.0 - gl_Color.z) * rawpos.y + gl_Color.z * (rawpos.y * rooftopscale.y);
|
||||
|
||||
// Adjust pitch of roof to the correct height. These vertices are identified by gl_Color.z
|
||||
// Scale down by the building height (instanceScaleRotate.z) because
|
||||
// immediately afterwards we will scale UP the vertex to the correct scale.
|
||||
rawpos.z = rawpos.z + gl_Color.z * rotPitchWtex0x.y / instanceScaleRotate.z;
|
||||
rawpos = rawpos * instanceScaleRotate.xyz;
|
||||
|
||||
// Rotation of the building and movement into rawpos
|
||||
rawpos.xy = vec2(dot(rawpos.xy, vec2(cr, sr)), dot(rawpos.xy, vec2(-sr, cr)));
|
||||
rawpos = rawpos + instancePosition.xyz;
|
||||
vec4 ecPosition = gl_ModelViewMatrix * vec4(rawpos, 1.0);
|
||||
|
||||
// Texture coordinates are stored as:
|
||||
// - a separate offset for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y)
|
||||
// - a shared gain value (tex1x, tex1y)
|
||||
//
|
||||
// The vertex color value selects between them, with glColor.x=1 indicating walls
|
||||
// and glColor.y=1 indicating roofs.
|
||||
// Finally, the roof texture is on the left of the texture sheet
|
||||
vec2 tex0 = vec2(sign(gl_MultiTexCoord0.x) * (gl_Color.x*rotPitchWtex0x.z + gl_Color.y*rtex0xRtex0y.x),
|
||||
gl_Color.x*wtex0yTex1xTex1y.x + gl_Color.y*rtex0xRtex0y.y);
|
||||
gl_TexCoord[0].x = tex0.x + gl_MultiTexCoord0.x * wtex0yTex1xTex1y.y;
|
||||
gl_TexCoord[0].y = tex0.y + gl_MultiTexCoord0.y * wtex0yTex1xTex1y.z;
|
||||
|
||||
// Rotate the normal.
|
||||
vec3 normal = gl_Normal;
|
||||
// Rotate the normal as per the building.
|
||||
normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr)));
|
||||
|
||||
VNormal = normalize(gl_NormalMatrix * normal);
|
||||
vec3 n = normalize(normal);
|
||||
vec3 tempTangent = cross(n, vec3(1.0,0.0,0.0));
|
||||
vec3 tempBinormal = cross(n, tempTangent);
|
||||
|
||||
if (nmap_enabled > 0){
|
||||
tempTangent = tangent;
|
||||
tempBinormal = binormal;
|
||||
}
|
||||
|
||||
VTangent = normalize(gl_NormalMatrix * tempTangent);
|
||||
VBinormal = normalize(gl_NormalMatrix * tempBinormal);
|
||||
vec3 t = tempTangent;
|
||||
vec3 b = tempBinormal;
|
||||
|
||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
||||
// transparency animation is at work
|
||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
||||
alpha = gl_FrontMaterial.diffuse.a;
|
||||
else
|
||||
alpha = 1.0;
|
||||
|
||||
// Vertex in eye coordinates
|
||||
vertVec = ecPosition.xyz;
|
||||
vViewVec.x = dot(t, vertVec);
|
||||
vViewVec.y = dot(b, vertVec);
|
||||
vViewVec.z = dot(n, vertVec);
|
||||
|
||||
// calculate the reflection vector
|
||||
vec4 reflect_eye = vec4(reflect(vertVec, VNormal), 0.0);
|
||||
vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz;
|
||||
if (refl_dynamic > 0){
|
||||
//prepare rotation matrix
|
||||
mat4 RotMatPR;
|
||||
mat4 RotMatH;
|
||||
float _roll = roll;
|
||||
if (_roll>90.0 || _roll < -90.0)
|
||||
{
|
||||
_roll = -_roll;
|
||||
}
|
||||
float cosRx = cos(radians(_roll));
|
||||
float sinRx = sin(radians(_roll));
|
||||
float cosRy = cos(radians(-pitch));
|
||||
float sinRy = sin(radians(-pitch));
|
||||
float cosRz = cos(radians(hdg));
|
||||
float sinRz = sin(radians(hdg));
|
||||
rotationMatrixPR(sinRx, cosRx, sinRy, cosRy, RotMatPR);
|
||||
rotationMatrixH(sinRz, cosRz, RotMatH);
|
||||
vec3 reflVec_dyn = (RotMatH * (RotMatPR * normalize(gl_ModelViewMatrixInverse * reflect_eye))).xyz;
|
||||
|
||||
reflVec = reflVec_dyn;
|
||||
} else {
|
||||
reflVec = reflVec_stat;
|
||||
}
|
||||
|
||||
if(rembrandt_enabled < 1){
|
||||
gl_FrontColor = gl_FrontMaterial.emission + vec4(1.0,1.0,1.0,1.0)
|
||||
* (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
||||
} else {
|
||||
gl_FrontColor = vec4(1.0,1.0,1.0,1.0);
|
||||
}
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(rawpos,1.0);
|
||||
}
|
283
Compositor/Shaders/ALS/building.vert
Normal file
283
Compositor/Shaders/ALS/building.vert
Normal file
|
@ -0,0 +1,283 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
#extension GL_EXT_draw_instanced : enable
|
||||
|
||||
// Shader that uses OpenGL state values to do per-pixel lighting
|
||||
//
|
||||
// The only light used is gl_LightSource[0], which is assumed to be
|
||||
// directional.
|
||||
//
|
||||
// Diffuse colors come from the gl_Color, ambient from the material. This is
|
||||
// equivalent to osg::Material::DIFFUSE.
|
||||
// Haze part added by Thorsten Renk, Oct. 2011
|
||||
|
||||
|
||||
#define MODE_OFF 0
|
||||
#define MODE_DIFFUSE 1
|
||||
#define MODE_AMBIENT_AND_DIFFUSE 2
|
||||
|
||||
attribute vec3 instancePosition; // (x,y,z)
|
||||
attribute vec3 instanceScaleRotate; // (width, depth, height)
|
||||
attribute vec3 rotPitchWtex0x; // (rotation, pitch height, texture x offset)
|
||||
attribute vec3 wtex0yTex1xTex1y; // (wall texture y offset, wall/roof texture x gain, wall/roof texture y gain)
|
||||
attribute vec3 rtex0xRtex0y; // (roof texture y offset, roof texture x gain, texture y gain)
|
||||
attribute vec3 rooftopscale; // (rooftop x scale, rooftop y scale)
|
||||
|
||||
// The constant term of the lighting equation that doesn't depend on
|
||||
// the surface normal is passed in gl_{Front,Back}Color. The alpha
|
||||
// component is set to 1 for front, 0 for back in order to work around
|
||||
// bugs with gl_FrontFacing in the fragment shader.
|
||||
varying vec4 diffuse_term;
|
||||
varying vec3 normal;
|
||||
varying vec3 relPos;
|
||||
|
||||
//varying float earthShade;
|
||||
//varying float yprime;
|
||||
//varying float vertex_alt;
|
||||
varying float yprime_alt;
|
||||
varying float mie_angle;
|
||||
|
||||
uniform int colorMode;
|
||||
uniform float hazeLayerAltitude;
|
||||
uniform float terminator;
|
||||
uniform float terrain_alt;
|
||||
uniform float avisibility;
|
||||
uniform float visibility;
|
||||
uniform float overcast;
|
||||
//uniform float scattering;
|
||||
uniform float ground_scattering;
|
||||
|
||||
uniform bool use_IR_vision;
|
||||
|
||||
// This is the value used in the skydome scattering shader - use the same here for consistency?
|
||||
const float EarthRadius = 5800000.0;
|
||||
const float terminator_width = 200000.0;
|
||||
|
||||
|
||||
float earthShade;
|
||||
//float mie_angle;
|
||||
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
//x = x - 0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x < -15.0) {return 0.0;}
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
vec4 light_diffuse;
|
||||
vec4 light_ambient;
|
||||
|
||||
float yprime;
|
||||
float lightArg;
|
||||
float intensity;
|
||||
float vertex_alt;
|
||||
float scattering;
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
|
||||
// Determine the rotation for the building.
|
||||
float sr = sin(6.28 * rotPitchWtex0x.x);
|
||||
float cr = cos(6.28 * rotPitchWtex0x.x);
|
||||
|
||||
vec3 position = gl_Vertex.xyz;
|
||||
// Adjust the very top of the roof to match the rooftop scaling. This shapes
|
||||
// the rooftop - gambled, gabled etc. These vertices are identified by gl_Color.z
|
||||
position.x = (1.0 - gl_Color.z) * position.x + gl_Color.z * ((position.x + 0.5) * rooftopscale.x - 0.5);
|
||||
position.y = (1.0 - gl_Color.z) * position.y + gl_Color.z * (position.y * rooftopscale.y);
|
||||
|
||||
// Adjust pitch of roof to the correct height. These vertices are identified by gl_Color.z
|
||||
// Scale down by the building height (instanceScaleRotate.z) because
|
||||
// immediately afterwards we will scale UP the vertex to the correct scale.
|
||||
position.z = position.z + gl_Color.z * rotPitchWtex0x.y / instanceScaleRotate.z;
|
||||
position = position * instanceScaleRotate.xyz;
|
||||
|
||||
// Rotation of the building and movement into position
|
||||
position.xy = vec2(dot(position.xy, vec2(cr, sr)), dot(position.xy, vec2(-sr, cr)));
|
||||
position = position + instancePosition.xyz;
|
||||
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0);
|
||||
|
||||
// Texture coordinates are stored as:
|
||||
// - a separate offset for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y)
|
||||
// - a shared gain value (tex1x, tex1y)
|
||||
//
|
||||
// The vertex color value selects between them, with glColor.x=1 indicating walls
|
||||
// and glColor.y=1 indicating roofs.
|
||||
// Finally, the roof texture is on the left of the texture sheet
|
||||
vec2 tex0 = vec2(sign(gl_MultiTexCoord0.x) * (gl_Color.x*rotPitchWtex0x.z + gl_Color.y*rtex0xRtex0y.x),
|
||||
gl_Color.x*wtex0yTex1xTex1y.x + gl_Color.y*rtex0xRtex0y.y);
|
||||
gl_TexCoord[0].x = tex0.x + gl_MultiTexCoord0.x * wtex0yTex1xTex1y.y;
|
||||
gl_TexCoord[0].y = tex0.y + gl_MultiTexCoord0.y * wtex0yTex1xTex1y.z;
|
||||
|
||||
// Rotate the normal.
|
||||
normal = gl_Normal;
|
||||
normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr)));
|
||||
normal = gl_NormalMatrix * normal;
|
||||
|
||||
|
||||
vec4 ambient_color, diffuse_color;
|
||||
if (colorMode == MODE_DIFFUSE) {
|
||||
diffuse_color = vec4(1.0,1.0,1.0,1.0);
|
||||
ambient_color = gl_FrontMaterial.ambient;
|
||||
} else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
|
||||
diffuse_color = vec4(1.0,1.0,1.0,1.0);
|
||||
ambient_color = vec4(1.0,1.0,1.0,1.0);
|
||||
} else {
|
||||
diffuse_color = gl_FrontMaterial.diffuse;
|
||||
ambient_color = gl_FrontMaterial.ambient;
|
||||
}
|
||||
|
||||
// here start computations for the haze layer
|
||||
// we need several geometrical quantities
|
||||
|
||||
// first current altitude of eye position in model space
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
|
||||
// and relative position to vector
|
||||
relPos = gl_Vertex.xyz + gl_Color.xyz - ep.xyz;
|
||||
|
||||
// unfortunately, we need the distance in the vertex shader, although the more accurate version
|
||||
// is later computed in the fragment shader again
|
||||
float dist = length(relPos);
|
||||
|
||||
// altitude of the vertex in question, somehow zero leads to artefacts, so ensure it is at least 100m
|
||||
vertex_alt = max(gl_Vertex.z + gl_Color.z,100.0);
|
||||
scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt);
|
||||
|
||||
// branch dependent on daytime
|
||||
|
||||
if (terminator < 1000000.0) // the full, sunrise and sunset computation
|
||||
{
|
||||
|
||||
|
||||
// establish coordinates relative to sun position
|
||||
|
||||
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
|
||||
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
|
||||
|
||||
|
||||
|
||||
// yprime is the distance of the vertex into sun direction
|
||||
yprime = -dot(relPos, lightHorizon);
|
||||
|
||||
// this gets an altitude correction, higher terrain gets to see the sun earlier
|
||||
yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
|
||||
// two times terminator width governs how quickly light fades into shadow
|
||||
// now the light-dimming factor
|
||||
earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4;
|
||||
|
||||
// parametrized version of the Flightgear ground lighting function
|
||||
lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
// directional scattering for low sun
|
||||
if (lightArg < 10.0)
|
||||
{mie_angle = (0.5 * dot(normalize(relPos), normalize(lightFull)) ) + 0.5;}
|
||||
else
|
||||
{mie_angle = 1.0;}
|
||||
|
||||
|
||||
|
||||
|
||||
light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 3.827, 1.08e-05, 1.0);
|
||||
light_diffuse.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
light_diffuse.a = 1.0;
|
||||
light_diffuse = light_diffuse * scattering;
|
||||
|
||||
light_ambient.r = light_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.33);
|
||||
light_ambient.g = light_ambient.r * 0.4/0.33;
|
||||
light_ambient.b = light_ambient.r * 0.5/0.33;
|
||||
light_ambient.a = 1.0;
|
||||
|
||||
// correct ambient light intensity and hue before sunrise
|
||||
if (earthShade < 0.5)
|
||||
{
|
||||
//light_ambient = light_ambient * (0.4 + 0.6 * smoothstep(0.2, 0.5, earthShade));
|
||||
intensity = length(light_ambient.rgb);
|
||||
light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.8,earthShade) ));
|
||||
|
||||
intensity = length(light_diffuse.rgb);
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) ));
|
||||
}
|
||||
|
||||
|
||||
// the haze gets the light at the altitude of the haze top if the vertex in view is below
|
||||
// but the light at the vertex if the vertex is above
|
||||
|
||||
vertex_alt = max(vertex_alt,hazeLayerAltitude);
|
||||
|
||||
if (vertex_alt > hazeLayerAltitude)
|
||||
{
|
||||
if (dist > 0.8 * avisibility)
|
||||
{
|
||||
vertex_alt = mix(vertex_alt, hazeLayerAltitude, smoothstep(0.8*avisibility, avisibility, dist));
|
||||
yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vertex_alt = hazeLayerAltitude;
|
||||
yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
}
|
||||
|
||||
}
|
||||
else // the faster, full-day version without lightfields
|
||||
{
|
||||
//vertex_alt = max(gl_Vertex.z,100.0);
|
||||
|
||||
earthShade = 1.0;
|
||||
mie_angle = 1.0;
|
||||
|
||||
if (terminator > 3000000.0)
|
||||
{light_diffuse = vec4 (1.0, 1.0, 1.0, 1.0);
|
||||
light_ambient = vec4 (0.33, 0.4, 0.5, 1.0); }
|
||||
else
|
||||
{
|
||||
|
||||
lightArg = (terminator/100000.0 - 10.0)/20.0;
|
||||
light_diffuse.b = 0.78 + lightArg * 0.21;
|
||||
light_diffuse.g = 0.907 + lightArg * 0.091;
|
||||
light_diffuse.r = 0.904 + lightArg * 0.092;
|
||||
light_diffuse.a = 1.0;
|
||||
|
||||
light_ambient.r = 0.316 + lightArg * 0.016;
|
||||
light_ambient.g = light_ambient.r * 0.4/0.33;
|
||||
light_ambient.b = light_ambient.r * 0.5/0.33;
|
||||
light_ambient.a = 1.0;
|
||||
}
|
||||
|
||||
light_diffuse = light_diffuse * scattering;
|
||||
yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude);
|
||||
}
|
||||
|
||||
if (use_IR_vision)
|
||||
{
|
||||
light_ambient.rgb = max(light_ambient.rgb, vec3 (0.5, 0.5, 0.5));
|
||||
}
|
||||
|
||||
|
||||
// default lighting based on texture and material using the light we have just computed
|
||||
|
||||
diffuse_term = diffuse_color* light_diffuse;
|
||||
vec4 constant_term = gl_FrontMaterial.emission + ambient_color *
|
||||
(gl_LightModel.ambient + light_ambient);
|
||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
||||
// transparency animation is at work
|
||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
||||
diffuse_term.a = gl_FrontMaterial.diffuse.a;
|
||||
else
|
||||
diffuse_term.a = 1.0;
|
||||
// Another hack for supporting two-sided lighting without using
|
||||
// gl_FrontFacing in the fragment shader.
|
||||
gl_FrontColor.rgb = constant_term.rgb;
|
||||
gl_BackColor.rgb = constant_term.rgb;
|
||||
//gl_FrontColor.a = mie_angle; gl_BackColor.a = mie_angle;
|
||||
}
|
293
Compositor/Shaders/ALS/chute.vert
Normal file
293
Compositor/Shaders/ALS/chute.vert
Normal file
|
@ -0,0 +1,293 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// Shader that uses OpenGL state values to do per-pixel lighting
|
||||
//
|
||||
// The only light used is gl_LightSource[0], which is assumed to be
|
||||
// directional.
|
||||
//
|
||||
// Diffuse colors come from the gl_Color, ambient from the material. This is
|
||||
// equivalent to osg::Material::DIFFUSE.
|
||||
// Haze part added by Thorsten Renk, Oct. 2011
|
||||
|
||||
|
||||
#define MODE_OFF 0
|
||||
#define MODE_DIFFUSE 1
|
||||
#define MODE_AMBIENT_AND_DIFFUSE 2
|
||||
|
||||
// The constant term of the lighting equation that doesn't depend on
|
||||
// the surface normal is passed in gl_{Front,Back}Color. The alpha
|
||||
// component is set to 1 for front, 0 for back in order to work around
|
||||
// bugs with gl_FrontFacing in the fragment shader.
|
||||
varying vec4 diffuse_term;
|
||||
varying vec3 normal;
|
||||
varying vec3 relPos;
|
||||
|
||||
varying float yprime_alt;
|
||||
varying float mie_angle;
|
||||
|
||||
uniform int colorMode;
|
||||
uniform float hazeLayerAltitude;
|
||||
uniform float terminator;
|
||||
uniform float terrain_alt;
|
||||
uniform float avisibility;
|
||||
uniform float visibility;
|
||||
uniform float overcast;
|
||||
uniform float ground_scattering;
|
||||
uniform float moonlight;
|
||||
uniform float chute_force;
|
||||
uniform float chute_fold;
|
||||
uniform float chute_bend;
|
||||
uniform float chute_projection_z;
|
||||
uniform float osg_SimulationTime;
|
||||
|
||||
|
||||
// This is the value used in the skydome scattering shader - use the same here for consistency?
|
||||
const float EarthRadius = 5800000.0;
|
||||
const float terminator_width = 200000.0;
|
||||
|
||||
|
||||
float earthShade;
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
//x = x - 0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x < -15.0) {return 0.0;}
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
vec4 light_diffuse;
|
||||
vec4 light_ambient;
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight;
|
||||
|
||||
vec4 vertex = gl_Vertex;
|
||||
|
||||
// wobble with wind
|
||||
|
||||
float force_speedup = max(0.8, chute_force);
|
||||
|
||||
float phi = asin(dot (vec2 (1.0, 0.0), normalize(vertex.xy)));
|
||||
float wobble = 0.02 * sin(12.0*osg_SimulationTime) * sin(14.0 * phi);
|
||||
wobble += 0.01 * sin(6.0*osg_SimulationTime) * sin(8.0 * phi);
|
||||
|
||||
vertex.xy*= (1.0 + wobble * (1.0 - 0.5 * chute_fold));
|
||||
|
||||
float displace_x = vertex.z * sin(6.0*osg_SimulationTime * force_speedup) * 0.05;
|
||||
float displace_y = vertex.z * cos(4.0*osg_SimulationTime * force_speedup) * 0.04;
|
||||
|
||||
vertex.xy += vec2 (displace_x, displace_y) * (1.0 - chute_fold);
|
||||
|
||||
// distort shape with force
|
||||
|
||||
float force_gain;
|
||||
float force_factor = abs(chute_force - 1.0);
|
||||
|
||||
if (chute_force < 1.0)
|
||||
{force_gain = 1.0 + 0.2 * force_factor;}
|
||||
else
|
||||
{force_gain = 1.0 - 0.2 * force_factor;}
|
||||
|
||||
vertex.xy*= force_gain;
|
||||
|
||||
vertex.z += 0.4 * (1./force_gain - 1.0) * max(vertex.z - chute_projection_z, 0.0);
|
||||
|
||||
// fold
|
||||
|
||||
vertex.z = chute_projection_z + (1.0 - 0.8* chute_fold) * (vertex.z - chute_projection_z);
|
||||
|
||||
vertex.z += 0.5 * chute_fold * (0.5 * sin(2.0 * vertex.x + 1.0 * osg_SimulationTime) * cos(3.0 * vertex.y + 1.5 * osg_SimulationTime));
|
||||
|
||||
// and bend
|
||||
|
||||
vertex.z -= vertex.x * vertex.x * 0.2 * chute_bend;
|
||||
|
||||
|
||||
//float yprime_alt;
|
||||
float yprime;
|
||||
float lightArg;
|
||||
float intensity;
|
||||
float vertex_alt;
|
||||
float scattering;
|
||||
|
||||
// this code is copied from default.vert
|
||||
|
||||
//vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
||||
//gl_Position = ftransform();
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
normal = gl_NormalMatrix * gl_Normal;
|
||||
vec4 ambient_color, diffuse_color;
|
||||
if (colorMode == MODE_DIFFUSE) {
|
||||
diffuse_color = gl_Color;
|
||||
ambient_color = gl_FrontMaterial.ambient;
|
||||
} else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
|
||||
diffuse_color = gl_Color;
|
||||
ambient_color = gl_Color;
|
||||
} else {
|
||||
diffuse_color = gl_FrontMaterial.diffuse;
|
||||
ambient_color = gl_FrontMaterial.ambient;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// here start computations for the haze layer
|
||||
// we need several geometrical quantities
|
||||
|
||||
// first current altitude of eye position in model space
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
|
||||
// and relative position to vector
|
||||
relPos = vertex.xyz - ep.xyz;
|
||||
|
||||
// unfortunately, we need the distance in the vertex shader, although the more accurate version
|
||||
// is later computed in the fragment shader again
|
||||
float dist = length(relPos);
|
||||
|
||||
// altitude of the vertex in question, somehow zero leads to artefacts, so ensure it is at least 100m
|
||||
vertex_alt = max(vertex.z,100.0);
|
||||
scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt);
|
||||
|
||||
|
||||
// branch dependent on daytime
|
||||
|
||||
if (terminator < 1000000.0) // the full, sunrise and sunset computation
|
||||
{
|
||||
|
||||
|
||||
// establish coordinates relative to sun position
|
||||
|
||||
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
|
||||
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
|
||||
|
||||
|
||||
|
||||
// yprime is the distance of the vertex into sun direction
|
||||
yprime = -dot(relPos, lightHorizon);
|
||||
|
||||
// this gets an altitude correction, higher terrain gets to see the sun earlier
|
||||
yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
|
||||
// two times terminator width governs how quickly light fades into shadow
|
||||
// now the light-dimming factor
|
||||
earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4;
|
||||
|
||||
// parametrized version of the Flightgear ground lighting function
|
||||
lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
// directional scattering for low sun
|
||||
if (lightArg < 10.0)
|
||||
{mie_angle = (0.5 * dot(normalize(relPos), normalize(lightFull)) ) + 0.5;}
|
||||
else
|
||||
{mie_angle = 1.0;}
|
||||
|
||||
|
||||
|
||||
|
||||
light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 3.827, 1.08e-05, 1.0);
|
||||
light_diffuse.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
light_diffuse.a = 1.0;
|
||||
light_diffuse = light_diffuse * scattering;
|
||||
|
||||
|
||||
light_ambient.r = light_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.33);
|
||||
light_ambient.g = light_ambient.r * 0.4/0.33;
|
||||
light_ambient.b = light_ambient.r * 0.5/0.33;
|
||||
light_ambient.a = 1.0;
|
||||
|
||||
|
||||
|
||||
|
||||
// correct ambient light intensity and hue before sunrise
|
||||
if (earthShade < 0.5)
|
||||
{
|
||||
//light_ambient = light_ambient * (0.7 + 0.3 * smoothstep(0.2, 0.5, earthShade));
|
||||
intensity = length(light_ambient.xyz);
|
||||
|
||||
light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.8,earthShade) ));
|
||||
light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
|
||||
|
||||
intensity = length(light_diffuse.xyz);
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) ));
|
||||
}
|
||||
|
||||
|
||||
// the haze gets the light at the altitude of the haze top if the vertex in view is below
|
||||
// but the light at the vertex if the vertex is above
|
||||
|
||||
vertex_alt = max(vertex_alt,hazeLayerAltitude);
|
||||
|
||||
if (vertex_alt > hazeLayerAltitude)
|
||||
{
|
||||
if (dist > 0.8 * avisibility)
|
||||
{
|
||||
vertex_alt = mix(vertex_alt, hazeLayerAltitude, smoothstep(0.8*avisibility, avisibility, dist));
|
||||
yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vertex_alt = hazeLayerAltitude;
|
||||
yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
}
|
||||
|
||||
}
|
||||
else // the faster, full-day version without lightfields
|
||||
{
|
||||
//vertex_alt = max(gl_Vertex.z,100.0);
|
||||
|
||||
earthShade = 1.0;
|
||||
mie_angle = 1.0;
|
||||
|
||||
if (terminator > 3000000.0)
|
||||
{light_diffuse = vec4 (1.0, 1.0, 1.0, 0.0);
|
||||
light_ambient = vec4 (0.33, 0.4, 0.5, 0.0); }
|
||||
else
|
||||
{
|
||||
|
||||
lightArg = (terminator/100000.0 - 10.0)/20.0;
|
||||
light_diffuse.b = 0.78 + lightArg * 0.21;
|
||||
light_diffuse.g = 0.907 + lightArg * 0.091;
|
||||
light_diffuse.r = 0.904 + lightArg * 0.092;
|
||||
light_diffuse.a = 1.0;
|
||||
|
||||
light_ambient.r = 0.316 + lightArg * 0.016;
|
||||
light_ambient.g = light_ambient.r * 0.4/0.33;
|
||||
light_ambient.b = light_ambient.r * 0.5/0.33;
|
||||
light_ambient.a = 1.0;
|
||||
}
|
||||
|
||||
light_diffuse = light_diffuse * scattering;
|
||||
yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude);
|
||||
}
|
||||
|
||||
|
||||
// default lighting based on texture and material using the light we have just computed
|
||||
|
||||
diffuse_term = diffuse_color* light_diffuse;
|
||||
vec4 constant_term = gl_FrontMaterial.emission + ambient_color *
|
||||
(gl_LightModel.ambient + light_ambient);
|
||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
||||
// transparency animation is at work
|
||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
||||
diffuse_term.a = gl_FrontMaterial.diffuse.a;
|
||||
else
|
||||
diffuse_term.a = gl_Color.a;
|
||||
// Another hack for supporting two-sided lighting without using
|
||||
// gl_FrontFacing in the fragment shader.
|
||||
gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0;
|
||||
gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vertex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
620
Compositor/Shaders/ALS/cliffs.frag
Normal file
620
Compositor/Shaders/ALS/cliffs.frag
Normal file
|
@ -0,0 +1,620 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// adapted by James Hester 2018, based on rock-ALS.frag
|
||||
// by Thorsten Renk.
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
varying vec4 diffuse_term;
|
||||
varying vec3 normal;
|
||||
varying vec3 relPos;
|
||||
varying vec2 rawPos;
|
||||
varying vec3 worldPos;
|
||||
varying vec3 ecViewdir;
|
||||
|
||||
|
||||
|
||||
varying float steepness;
|
||||
varying vec2 grad_dir;
|
||||
|
||||
|
||||
uniform float visibility;
|
||||
uniform float avisibility;
|
||||
uniform float scattering;
|
||||
uniform float terminator;
|
||||
uniform float terrain_alt;
|
||||
uniform float hazeLayerAltitude;
|
||||
uniform float overcast;
|
||||
uniform float eye_alt;
|
||||
uniform float dust_cover_factor;
|
||||
uniform float lichen_cover_factor;
|
||||
uniform float wetness;
|
||||
uniform float fogstructure;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float contrast;
|
||||
uniform float air_pollution;
|
||||
uniform float intrinsic_wetness;
|
||||
uniform float transition_model;
|
||||
uniform float overlay_bias;
|
||||
uniform float crack_depth;
|
||||
uniform float crack_pattern_stretch;
|
||||
uniform float grain_fade_power;
|
||||
uniform float rock_brightness;
|
||||
uniform float overlay_alpha;
|
||||
uniform float dust_resistance;
|
||||
uniform float slopeline_strength;
|
||||
uniform float landing_light1_offset;
|
||||
uniform float landing_light2_offset;
|
||||
uniform float landing_light3_offset;
|
||||
uniform float osg_SimulationTime;
|
||||
|
||||
uniform vec3 base_color;
|
||||
uniform vec3 overlay_color;
|
||||
|
||||
uniform int wind_effects;
|
||||
uniform int cloud_shadow_flag;
|
||||
uniform int rock_strata;
|
||||
uniform int use_searchlight;
|
||||
uniform int use_landing_light;
|
||||
uniform int use_alt_landing_light;
|
||||
|
||||
const float EarthRadius = 5800000.0;
|
||||
const float terminator_width = 200000.0;
|
||||
|
||||
float alt;
|
||||
float eShade;
|
||||
float yprime_alt;
|
||||
float mie_angle;
|
||||
|
||||
float shadow_func (in float x, in float y, in float noise, in float dist);
|
||||
float Noise2D(in vec2 coord, in float wavelength);
|
||||
float Noise3D(in vec3 coord, in float wavelength);
|
||||
float VoronoiNoise2D(in vec2 coord, in float wavelength, in float xrand, in float yrand);
|
||||
float SlopeLines2D(in vec2 coord, in vec2 gradDir, in float wavelength, in float steepness);
|
||||
float Strata3D(in vec3 coord, in float wavelength, in float variation);
|
||||
float fog_func (in float targ, in float alt);
|
||||
float rayleigh_in_func(in float dist, in float air_pollution, in float avisibility, in float eye_alt, in float vertex_alt);
|
||||
float alt_factor(in float eye_alt, in float vertex_alt);
|
||||
float light_distance_fading(in float dist);
|
||||
float fog_backscatter(in float avisibility);
|
||||
|
||||
vec3 rayleigh_out_shift(in vec3 color, in float outscatter);
|
||||
vec3 get_hazeColor(in float light_arg);
|
||||
vec3 searchlight();
|
||||
vec3 landing_light(in float offset, in float offsetv);
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
x = x - 0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x > 30.0) {return e;}
|
||||
if (x < -15.0) {return 0.0;}
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
|
||||
// a fade function for procedural scales which are smaller than a pixel
|
||||
|
||||
float detail_fade (in float scale, in float angle, in float dist)
|
||||
{
|
||||
float fade_dist = 2000.0 * scale * angle/max(pow(steepness,4.0), 0.1);
|
||||
|
||||
return 1.0 - smoothstep(0.5 * fade_dist, fade_dist, dist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
yprime_alt = diffuse_term.a;
|
||||
//diffuse_term.a = 1.0;
|
||||
mie_angle = gl_Color.a;
|
||||
float effective_scattering = min(scattering, cloud_self_shading);
|
||||
|
||||
// distance to fragment
|
||||
float dist = length(relPos);
|
||||
// horizontal distance using texture coordinate
|
||||
float horiz_coord = gl_TexCoord[0].s * 1000.0;
|
||||
// angle of view vector with horizon
|
||||
float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
|
||||
// float altitude of fragment above base of cliff
|
||||
float cliff_altitude = gl_TexCoord[0].t * 1000.0;
|
||||
|
||||
|
||||
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
|
||||
// this is taken from default.frag
|
||||
vec3 n;
|
||||
float NdotL, NdotHV, fogFactor;
|
||||
vec4 color = gl_Color;
|
||||
color.a = 1.0;
|
||||
vec3 lightDir = gl_LightSource[0].position.xyz;
|
||||
vec3 halfVector = normalize(normalize(lightDir) + normalize(ecViewdir));
|
||||
vec4 texel;
|
||||
vec4 detail_texel;
|
||||
vec4 mix_texel;
|
||||
vec4 grain_texel;
|
||||
vec4 dot_texel;
|
||||
vec4 gradient_texel;
|
||||
vec4 foam_texel;
|
||||
vec4 fragColor;
|
||||
vec4 specular = vec4(0.0);
|
||||
float intensity;
|
||||
|
||||
|
||||
|
||||
// Perlin noise, distance along cliff in texture coordinate instead of x,y
|
||||
|
||||
float noise_100m = Noise2D(vec2(horiz_coord,cliff_altitude),100.0);
|
||||
float noise_50m = Noise2D(vec2(horiz_coord,cliff_altitude), 50.0);
|
||||
float noise_25m = Noise2D(vec2(horiz_coord,cliff_altitude), 25.0);
|
||||
float noise_10m = Noise2D(vec2(horiz_coord,cliff_altitude), 10.0);
|
||||
float noise_5m = Noise2D(vec2(horiz_coord,cliff_altitude) ,5.0);
|
||||
float noise_2m = Noise2D(vec2(horiz_coord,cliff_altitude) ,2.0);
|
||||
float noise_1m = Noise2D(vec2(horiz_coord,cliff_altitude) ,1.0);
|
||||
float noise_05m = Noise2D(vec2(horiz_coord,cliff_altitude),0.5);
|
||||
float noise_02m = Noise2D(vec2(horiz_coord,cliff_altitude),0.2);
|
||||
float noise_01m = Noise2D(vec2(horiz_coord,cliff_altitude), 0.1);
|
||||
|
||||
float noisegrad_10m;
|
||||
float noisegrad_5m;
|
||||
float noisegrad_2m;
|
||||
float noisegrad_1m;
|
||||
float noisegrad_05m;
|
||||
float noisegrad_02m;
|
||||
float noisegrad_01m;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
float noise_250m = Noise3D(worldPos.xyz,250.0);
|
||||
float noise_500m = Noise3D(worldPos.xyz, 500.0);
|
||||
float noise_1500m = Noise3D(worldPos.xyz, 1500.0);
|
||||
float noise_2000m = Noise3D(worldPos.xyz, 2000.0);
|
||||
|
||||
// dot noise
|
||||
|
||||
float dotnoise_2m = 0.0;
|
||||
float dotnoise_10m = 0.0;
|
||||
float dotnoise_15m = 0.0;
|
||||
|
||||
float dotnoisegrad_10m;
|
||||
|
||||
// slope noise
|
||||
|
||||
float slopenoise_50m = SlopeLines2D(rawPos, grad_dir, 50.0, steepness);
|
||||
float slopenoise_100m = SlopeLines2D(rawPos, grad_dir, 100.0, steepness);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// get the texels
|
||||
|
||||
float noise_term;
|
||||
float local_autumn_factor;
|
||||
|
||||
// we need to fade procedural structures when they get smaller than a single pixel, for this we need
|
||||
// to know under what angle we see the surface
|
||||
|
||||
float view_angle = abs(dot(normalize(normal), normalize(ecViewdir)));
|
||||
|
||||
// strata noise
|
||||
|
||||
float stratnoise_50m;
|
||||
float stratnoise_10m;
|
||||
|
||||
if (rock_strata==1)
|
||||
{
|
||||
stratnoise_50m = Strata3D(vec3 (rawPos.x, rawPos.y, cliff_altitude), 50.0, 0.2);
|
||||
stratnoise_10m = Strata3D(vec3 (rawPos.x, rawPos.y, cliff_altitude), 10.0, 0.2);
|
||||
stratnoise_50m = mix(stratnoise_50m, 1.0, smoothstep(0.8,0.9, steepness));
|
||||
stratnoise_10m = mix(stratnoise_10m, 1.0, smoothstep(0.8,0.9, steepness));
|
||||
texel *= (0.4 + 0.4 * stratnoise_50m + 0.2 * stratnoise_10m);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// procedural rock texture generation
|
||||
|
||||
texel.rgb = base_color;
|
||||
|
||||
// use powers of Perlin noise to generate the base pattern
|
||||
|
||||
float grainy_noise;
|
||||
float fade_norm;
|
||||
|
||||
float gfp = grain_fade_power;
|
||||
float gfptmp;
|
||||
|
||||
//grainy_noise = (0.5 * (1.0-slopenoise_100m) + 0.5 *noise_50m) + gfp * (0.5 * slopenoise_50m + 0.5 * noise_25m);
|
||||
grainy_noise = (0.5 *noise_50m) + gfp * ( 0.5 * noise_25m);
|
||||
fade_norm = 1.0+gfp;
|
||||
|
||||
gfptmp = gfp * gfp;
|
||||
grainy_noise += noise_10m * gfptmp * detail_fade(10.0, view_angle, dist) ;
|
||||
fade_norm += gfptmp * detail_fade(10.0, view_angle, dist) ;
|
||||
|
||||
gfptmp = gfptmp * gfp;
|
||||
grainy_noise += noise_5m * gfptmp * detail_fade(5.0, view_angle, dist) ;
|
||||
fade_norm += gfptmp * detail_fade(5.0, view_angle, dist) ;
|
||||
|
||||
gfptmp = gfptmp * gfp;
|
||||
grainy_noise += noise_2m * gfptmp * detail_fade(2.0, view_angle, dist) ;
|
||||
fade_norm += gfptmp * detail_fade(2.0, view_angle, dist) ;
|
||||
|
||||
gfptmp = gfptmp * gfp;
|
||||
grainy_noise += noise_1m * gfptmp * detail_fade(1.0, view_angle, dist) ;
|
||||
fade_norm += gfptmp * detail_fade(1.0, view_angle, dist) ;
|
||||
|
||||
gfptmp = gfptmp * gfp;
|
||||
grainy_noise += noise_05m * gfptmp * detail_fade(0.5, view_angle, dist) ;
|
||||
fade_norm += gfptmp * detail_fade(0.5, view_angle, dist) ;
|
||||
|
||||
grainy_noise = grainy_noise/fade_norm;
|
||||
grainy_noise = smoothstep(-0.2, 1.2, grainy_noise);
|
||||
|
||||
// generate the crack pattern from isovalue lines of stretched Perlin noise
|
||||
|
||||
float cnoise_500m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 500.0);
|
||||
float cnoise_250m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 250.0);
|
||||
float cnoise_100m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 100.0);
|
||||
float cnoise_50m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 50.0);
|
||||
float cnoise_25m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 25.0);
|
||||
float cnoise_10m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 10.0);
|
||||
float cnoise_5m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 5.0);
|
||||
float cnoise_2m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 2.0);
|
||||
float cnoise_1m = Noise2D(vec2(horiz_coord+10.0, crack_pattern_stretch * cliff_altitude), 1.0);
|
||||
|
||||
float crack_noise;
|
||||
float crack_factor;
|
||||
float crack_size;
|
||||
float scrack_noise;
|
||||
float scrack_size;
|
||||
|
||||
crack_noise = cnoise_500m + 0.65 * cnoise_250m + 0.42 * cnoise_100m * detail_fade(50.0, view_angle, dist) ;
|
||||
crack_noise = crack_noise + 0.27 * cnoise_50m * detail_fade(25.0, view_angle, dist) ;
|
||||
crack_noise = crack_noise + 0.17 * cnoise_25m * detail_fade(10.0, view_angle, dist) ;
|
||||
crack_noise = crack_noise + 0.11 * cnoise_10m * detail_fade(5.0, view_angle, dist) ;
|
||||
crack_noise = 0.381 * crack_noise;
|
||||
|
||||
|
||||
|
||||
scrack_noise = cnoise_10m + 0.65 * cnoise_5m * detail_fade(5.0, view_angle, dist);
|
||||
scrack_noise = scrack_noise + 0.3 * cnoise_2m + 0.1 * cnoise_1m * detail_fade(1.0, view_angle, dist);
|
||||
scrack_noise = 0.48 * scrack_noise;
|
||||
|
||||
crack_size = 0.02 +0.00001 * dist;
|
||||
crack_factor = smoothstep(0.5-crack_size,0.50,crack_noise) * (1.0-smoothstep(0.51,0.51+crack_size,crack_noise));
|
||||
//crack_factor = step(0.5-0.2*crack_size,crack_noise) * (1.0-step(0.5+0.2*crack_size,crack_noise));
|
||||
|
||||
crack_size *= 0.5;
|
||||
crack_factor += smoothstep(0.42,0.42+crack_size,crack_noise) * (1.0-smoothstep(0.43,0.43+crack_size,crack_noise));
|
||||
|
||||
scrack_size = crack_size * 4.0;
|
||||
crack_factor += 0.75 * smoothstep(0.5-scrack_size,0.50,scrack_noise) * (1.0-smoothstep(0.51,0.51+scrack_size,scrack_noise))* (1.0- smoothstep(250.0,1000.0,dist));
|
||||
|
||||
|
||||
crack_factor = crack_factor * min(1.0,0.03/crack_size);
|
||||
|
||||
|
||||
|
||||
// distribution of overlay color
|
||||
|
||||
|
||||
float overlay_noise;
|
||||
float overlay_factor;
|
||||
|
||||
overlay_noise = 0.381 * (noise_50m + 0.65 * noise_25m + 0.42 * noise_10m + 0.27 * noise_5m + 0.17 * noise_2m + 0.11 * noise_1m);
|
||||
overlay_noise = overlay_noise + 0.1 * (smoothstep(0.8,0.9, steepness));
|
||||
|
||||
overlay_factor = smoothstep(0.7, 0.72, overlay_noise + overlay_bias) + (1.0 - smoothstep(0.2, 0.22, overlay_noise - overlay_bias));
|
||||
|
||||
|
||||
|
||||
// merge the noise components
|
||||
|
||||
//grainy_noise = grainy_noise * (1.0-crack_depth * crack_factor) + 0.5 * crack_depth * crack_factor;
|
||||
texel.rgb = ((1.0 - contrast) + contrast * grainy_noise ) * texel.rgb;
|
||||
texel.rgb = mix(texel.rgb, overlay_color.rgb,overlay_alpha * overlay_factor);
|
||||
texel.rgb = texel.rgb * ((1.0-crack_depth) +crack_depth*(1.0-crack_factor * (0.5 + 0.5 * noise_50m) ));
|
||||
|
||||
texel.rgb = texel.rgb * rock_brightness;
|
||||
|
||||
texel.rgb = texel.rgb * (1.0 + 0.4 * (noise_01m-0.5) * detail_fade(0.1, view_angle, dist)) ;
|
||||
|
||||
|
||||
const vec4 dust_color = vec4 (0.76, 0.65, 0.45, 1.0);
|
||||
const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0);
|
||||
|
||||
// mix vegetation
|
||||
float gradient_factor = smoothstep(0.5, 1.0, steepness);
|
||||
texel = mix(texel, lichen_color, gradient_factor * (0.4 * lichen_cover_factor + 0.8 * lichen_cover_factor * 0.5 * (noise_10m + (1.0 - noise_5m))) );
|
||||
// mix dust
|
||||
texel = mix(texel, dust_color, clamp(0.5 * dust_cover_factor *dust_resistance + 3.0 * dust_cover_factor * dust_resistance *(((noise_1500m - 0.5) * 0.125)+0.125 ), 0.0, 1.0) );
|
||||
|
||||
// get distribution of water when terrain is wet
|
||||
|
||||
float combined_wetness = min(1.0, wetness + intrinsic_wetness);
|
||||
float water_threshold1;
|
||||
float water_threshold2;
|
||||
float water_factor =0.0;
|
||||
|
||||
|
||||
if ((dist < 5000.0) && (combined_wetness>0.0))
|
||||
{
|
||||
water_threshold1 = 1.0-0.5* combined_wetness;
|
||||
water_threshold2 = 1.0 - 0.3 * combined_wetness;
|
||||
water_factor = smoothstep(water_threshold1, water_threshold2 , (0.3 * (2.0 * (1.0-noise_10m) + (1.0 -noise_5m)) * (1.0 - smoothstep(2000.0, 5000.0, dist))) - 5.0 * (1.0 -steepness));
|
||||
}
|
||||
|
||||
// darken wet terrain
|
||||
|
||||
texel.rgb = texel.rgb * (1.0 - 0.6 * combined_wetness);
|
||||
|
||||
|
||||
|
||||
// light computations
|
||||
|
||||
|
||||
vec4 light_specular = gl_LightSource[0].specular;
|
||||
|
||||
// If gl_Color.a == 0, this is a back-facing polygon and the
|
||||
// normal should be reversed.
|
||||
//n = (2.0 * gl_Color.a - 1.0) * normal;
|
||||
n = normal;
|
||||
n = normalize(n);
|
||||
|
||||
NdotL = dot(n, lightDir);
|
||||
|
||||
noisegrad_10m = (noise_10m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),10.0))/0.05;
|
||||
noisegrad_5m = (noise_5m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),5.0))/0.05;
|
||||
noisegrad_2m = (noise_2m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),2.0))/0.05;
|
||||
noisegrad_1m = (noise_1m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),1.0))/0.05;
|
||||
noisegrad_05m = (noise_05m - Noise2D(rawPos.xy+ 0.05 * normalize(lightDir.xy),0.5))/0.05;
|
||||
|
||||
|
||||
dotnoisegrad_10m = 0.0;
|
||||
|
||||
float fresnel;
|
||||
|
||||
if (NdotL > 0.0) {
|
||||
if (cloud_shadow_flag == 1) {NdotL = NdotL * shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);}
|
||||
color += diffuse_term * NdotL;
|
||||
NdotHV = max(dot(n, halfVector), 0.0);
|
||||
|
||||
fresnel = 1.0 + 5.0 * (1.0-smoothstep(0.0,0.2, dot(normalize(ecViewdir),n)));
|
||||
|
||||
//if (gl_FrontMaterial.shininess > 0.0)
|
||||
specular.rgb = ((gl_FrontMaterial.specular.rgb * 0.1 + (water_factor * vec3 (1.0, 1.0, 1.0)))
|
||||
* light_specular.rgb
|
||||
* pow(NdotHV, max(gl_FrontMaterial.shininess,4.0) + (20.0 * water_factor)));
|
||||
}
|
||||
color.a = 1.0;//diffuse_term.a;
|
||||
// This shouldn't be necessary, but our lighting becomes very
|
||||
// saturated. Clamping the color before modulating by the texture
|
||||
// is closer to what the OpenGL fixed function pipeline does.
|
||||
color = clamp(color, 0.0, 1.0);
|
||||
|
||||
vec3 secondary_light = vec3 (0.0,0.0,0.0);
|
||||
|
||||
if (use_searchlight == 1)
|
||||
{
|
||||
secondary_light += searchlight();
|
||||
}
|
||||
if (use_landing_light == 1)
|
||||
{
|
||||
secondary_light += landing_light(landing_light1_offset, landing_light3_offset);
|
||||
}
|
||||
if (use_alt_landing_light == 1)
|
||||
{
|
||||
secondary_light += landing_light(landing_light2_offset, landing_light3_offset);
|
||||
}
|
||||
color.rgb +=secondary_light * light_distance_fading(dist);
|
||||
|
||||
|
||||
fragColor = color * texel + specular;
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
vec3 hazeColor = get_hazeColor(lightArg);
|
||||
|
||||
|
||||
|
||||
// Rayleigh color shift due to out-scattering
|
||||
float rayleigh_length = 0.5 * avisibility * (2.5 - 1.9 * air_pollution)/alt_factor(eye_alt, eye_alt+relPos.z);
|
||||
float outscatter = 1.0-exp(-dist/rayleigh_length);
|
||||
fragColor.rgb = rayleigh_out_shift(fragColor.rgb,outscatter);
|
||||
|
||||
// Rayleigh color shift due to in-scattering
|
||||
|
||||
float rShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt + 420000.0);
|
||||
float lightIntensity = length(hazeColor * effective_scattering) * rShade;
|
||||
vec3 rayleighColor = vec3 (0.17, 0.52, 0.87) * lightIntensity;
|
||||
float rayleighStrength = rayleigh_in_func(dist, air_pollution, avisibility/max(lightIntensity,0.05), eye_alt, eye_alt + relPos.z);
|
||||
fragColor.rgb = mix(fragColor.rgb, rayleighColor,rayleighStrength);
|
||||
|
||||
|
||||
// here comes the terrain haze model
|
||||
|
||||
|
||||
float delta_z = hazeLayerAltitude - eye_alt;
|
||||
|
||||
float mvisibility = min(visibility,avisibility);
|
||||
|
||||
if (dist > 0.04 * mvisibility)
|
||||
|
||||
{
|
||||
|
||||
alt = eye_alt;
|
||||
|
||||
|
||||
float transmission;
|
||||
float vAltitude;
|
||||
float delta_zv;
|
||||
float H;
|
||||
float distance_in_layer;
|
||||
float transmission_arg;
|
||||
|
||||
|
||||
|
||||
|
||||
// we solve the geometry what part of the light path is attenuated normally and what is through the haze layer
|
||||
|
||||
if (delta_z > 0.0) // we're inside the layer
|
||||
{
|
||||
if (ct < 0.0) // we look down
|
||||
{
|
||||
distance_in_layer = dist;
|
||||
vAltitude = min(distance_in_layer,mvisibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
else // we may look through upper layer edge
|
||||
{
|
||||
H = dist * ct;
|
||||
if (H > delta_z) {distance_in_layer = dist/H * delta_z;}
|
||||
else {distance_in_layer = dist;}
|
||||
vAltitude = min(distance_in_layer,visibility) * ct;
|
||||
delta_zv = delta_z - vAltitude;
|
||||
}
|
||||
}
|
||||
else // we see the layer from above, delta_z < 0.0
|
||||
{
|
||||
H = dist * -ct;
|
||||
if (H < (-delta_z)) // we don't see into the layer at all, aloft visibility is the only fading
|
||||
{
|
||||
distance_in_layer = 0.0;
|
||||
delta_zv = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vAltitude = H + delta_z;
|
||||
distance_in_layer = vAltitude/H * dist;
|
||||
vAltitude = min(distance_in_layer,visibility) * (-ct);
|
||||
delta_zv = vAltitude;
|
||||
}
|
||||
}
|
||||
|
||||
// blur of the haze layer edge
|
||||
|
||||
float blur_thickness = 50.0;
|
||||
float cphi = dot(vec3(0.0, 1.0, 0.0), relPos)/dist;
|
||||
float ctlayer = delta_z/dist-0.01 + 0.02 * Noise2D(vec2(cphi,1.0),0.1) -0.01;
|
||||
float ctblur = 0.035 ;
|
||||
|
||||
float blur_dist;
|
||||
|
||||
if (abs(delta_z) < 400.0)
|
||||
{
|
||||
blur_dist = dist * (1.0-smoothstep(0.0,300.0,-delta_z)) * smoothstep(-400.0,-200.0, -delta_z);
|
||||
blur_dist = blur_dist * smoothstep(ctlayer-4.0*ctblur, ctlayer-ctblur, ct) * (1.0-smoothstep(ctlayer+0.5*ctblur, ctlayer+ctblur, ct));
|
||||
distance_in_layer = max(distance_in_layer, blur_dist);
|
||||
}
|
||||
|
||||
|
||||
// ground haze cannot be thinner than aloft visibility in the model,
|
||||
// so we need to use aloft visibility otherwise
|
||||
|
||||
|
||||
transmission_arg = (dist-distance_in_layer)/avisibility;
|
||||
|
||||
|
||||
float eqColorFactor;
|
||||
|
||||
|
||||
|
||||
if (visibility < avisibility)
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * visibility + 1.0 * visibility * fogstructure * 0.06 * (noise_1500m + noise_2000m -1.0) ));
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/visibility - (1.0 - effective_scattering);
|
||||
}
|
||||
else
|
||||
{
|
||||
transmission_arg = transmission_arg + (distance_in_layer/(1.0 * avisibility + 1.0 * avisibility * fogstructure * 0.06 * (noise_1500m + noise_2000m - 1.0) ));
|
||||
// this combines the Weber-Fechner intensity
|
||||
eqColorFactor = 1.0 - 0.1 * delta_zv/avisibility - (1.0 - effective_scattering);
|
||||
}
|
||||
|
||||
|
||||
|
||||
transmission = fog_func(transmission_arg, alt);
|
||||
|
||||
// there's always residual intensity, we should never be driven to zero
|
||||
if (eqColorFactor < 0.2) eqColorFactor = 0.2;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// now dim the light for haze
|
||||
eShade = 1.0 - 0.9 * smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt);
|
||||
|
||||
// Mie-like factor
|
||||
|
||||
if (lightArg < 10.0)
|
||||
{
|
||||
intensity = length(hazeColor);
|
||||
float mie_magnitude = 0.5 * smoothstep(350000.0, 150000.0, terminator-sqrt(2.0 * EarthRadius * terrain_alt));
|
||||
hazeColor = intensity * ((1.0 - mie_magnitude) + mie_magnitude * mie_angle) * normalize(mix(hazeColor, vec3 (0.5, 0.58, 0.65), mie_magnitude * (0.5 - 0.5 * mie_angle)) );
|
||||
}
|
||||
|
||||
intensity = length(hazeColor);
|
||||
|
||||
if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColor doesn't come out correctly
|
||||
{
|
||||
|
||||
|
||||
// high altitude desaturation of the haze color
|
||||
hazeColor = intensity * normalize (mix(hazeColor, intensity * vec3 (1.0,1.0,1.0), 0.7* smoothstep(5000.0, 50000.0, alt)));
|
||||
|
||||
// blue hue of haze
|
||||
hazeColor.x = hazeColor.x * 0.83;
|
||||
hazeColor.y = hazeColor.y * 0.9;
|
||||
|
||||
|
||||
// additional blue in indirect light
|
||||
float fade_out = max(0.65 - 0.3 *overcast, 0.45);
|
||||
intensity = length(hazeColor);
|
||||
hazeColor = intensity * normalize(mix(hazeColor, 1.5* shadedFogColor, 1.0 -smoothstep(0.25, fade_out,eShade) ));
|
||||
|
||||
// change haze color to blue hue for strong fogging
|
||||
hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothstep(0.5,0.9,eqColorFactor))));
|
||||
|
||||
|
||||
|
||||
// reduce haze intensity when looking at shaded surfaces, only in terminator region
|
||||
float shadow = mix( min(1.0 + dot(n,lightDir),1.0), 1.0, 1.0-smoothstep(0.1, 0.4, transmission));
|
||||
hazeColor = mix(shadow * hazeColor, hazeColor, 0.3 + 0.7* smoothstep(250000.0, 400000.0, terminator));
|
||||
}
|
||||
|
||||
// don't let the light fade out too rapidly
|
||||
lightArg = (terminator + 200000.0)/100000.0;
|
||||
float minLightIntensity = min(0.2,0.16 * lightArg + 0.5);
|
||||
vec3 minLight = minLightIntensity * vec3 (0.2, 0.3, 0.4);
|
||||
|
||||
hazeColor.rgb *= eqColorFactor * eShade;
|
||||
hazeColor.rgb = max(hazeColor.rgb, minLight.rgb);
|
||||
|
||||
|
||||
fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission);
|
||||
|
||||
}
|
||||
|
||||
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||
|
||||
gl_FragColor = fragColor;
|
||||
|
||||
|
||||
}
|
||||
|
135
Compositor/Shaders/ALS/cloud-impostor.vert
Normal file
135
Compositor/Shaders/ALS/cloud-impostor.vert
Normal file
|
@ -0,0 +1,135 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
varying float fogFactor;
|
||||
varying vec3 hazeColor;
|
||||
|
||||
uniform float terminator;
|
||||
uniform float altitude;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float moonlight;
|
||||
uniform float air_pollution;
|
||||
uniform float range;
|
||||
uniform float visibility;
|
||||
|
||||
const float shade = 1.0;
|
||||
const float cloud_height = 1000.0;
|
||||
const float EarthRadius = 5800000.0;
|
||||
|
||||
vec3 moonlight_perception (in vec3 light);
|
||||
|
||||
// light_func is a generalized logistic function fit to the light intensity as a function
|
||||
// of scaled terminator position obtained from Flightgear core
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
x = x-0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x > 30.0) {return e;}
|
||||
if (x < -15.0) {return 0.03;}
|
||||
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
vec3 shadedFogColor = vec3 (0.55, 0.67, 0.88);
|
||||
vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight;
|
||||
moonLightColor = moonlight_perception (moonLightColor);
|
||||
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
//gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0);
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
||||
vec3 u = normalize(ep.xyz - l.xyz);
|
||||
|
||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
gl_Position.x = gl_Vertex.x;
|
||||
gl_Position.y += gl_Vertex.y;
|
||||
gl_Position.z += gl_Vertex.z;
|
||||
gl_Position.xyz += gl_Color.xyz;
|
||||
|
||||
|
||||
// Determine a lighting normal based on the vertex position from the
|
||||
// center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
|
||||
float n = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
|
||||
|
||||
// Determine the position - used for fog and shading calculations
|
||||
vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);
|
||||
float fogCoord = abs(ecPosition.z);
|
||||
float fract = smoothstep(0.0, cloud_height, gl_Position.z + cloud_height);
|
||||
|
||||
vec3 relVector = gl_Position.xyz - ep.xyz;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
|
||||
|
||||
// Light at the final position
|
||||
|
||||
// first obtain normal to sun position
|
||||
|
||||
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
|
||||
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
|
||||
|
||||
// yprime is the distance of the vertex into sun direction, corrected for altitude
|
||||
//float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0);
|
||||
float vertex_alt = altitude + relVector.z;
|
||||
float yprime = -dot(relVector, lightHorizon);
|
||||
float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
|
||||
// compute the light at the position
|
||||
vec4 light_diffuse;
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
light_diffuse.b = light_func(lightArg -1.2 * air_pollution, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0);
|
||||
light_diffuse.g = light_func(lightArg -0.6 * air_pollution, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
light_diffuse.a = 1.0;
|
||||
|
||||
|
||||
// two times terminator width governs how quickly light fades into shadow
|
||||
float terminator_width = 200000.0;
|
||||
float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1;
|
||||
|
||||
float intensity = (1.0 - (0.8 * (1.0 - earthShade))) * length(light_diffuse.rgb);
|
||||
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, cloud_self_shading ))));
|
||||
if (earthShade < 0.6)
|
||||
{
|
||||
intensity = length(light_diffuse.rgb);
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.6,earthShade ) ));
|
||||
}
|
||||
|
||||
|
||||
|
||||
gl_FrontColor = light_diffuse;
|
||||
|
||||
|
||||
// As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
|
||||
gl_FrontColor.a = min(smoothstep(100.0, 250.0, fogCoord), 1.0 - smoothstep(0.9 * range, range, fogCoord));
|
||||
|
||||
|
||||
|
||||
gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(visibility, 3.0* visibility, fogCoord));
|
||||
|
||||
// Fog doesn't affect rain as much as other objects.
|
||||
|
||||
float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0);
|
||||
if (fadeScale < 0.05) fadeScale = 0.05;
|
||||
fogFactor = exp( -gl_Fog.density * 0.5* fogCoord * fadeScale);
|
||||
|
||||
hazeColor = light_diffuse.rgb;
|
||||
hazeColor.r = hazeColor.r * 0.83;
|
||||
hazeColor.g = hazeColor.g * 0.9;
|
||||
|
||||
|
||||
|
||||
|
||||
gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
|
||||
hazeColor.rgb = hazeColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
|
||||
gl_BackColor = gl_FrontColor;
|
||||
|
||||
}
|
144
Compositor/Shaders/ALS/cloud-noctilucent.vert
Normal file
144
Compositor/Shaders/ALS/cloud-noctilucent.vert
Normal file
|
@ -0,0 +1,144 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
varying float fogFactor;
|
||||
varying vec3 hazeColor;
|
||||
|
||||
uniform float terminator;
|
||||
uniform float altitude;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float moonlight;
|
||||
|
||||
const float shade = 1.0;
|
||||
const float cloud_height = 1000.0;
|
||||
const float EarthRadius = 5800000.0;
|
||||
|
||||
vec3 moonlight_perception (in vec3 light);
|
||||
|
||||
// light_func is a generalized logistic function fit to the light intensity as a function
|
||||
// of scaled terminator position obtained from Flightgear core
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
x = x-0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x > 30.0) {return e;}
|
||||
if (x < -15.0) {return 0.03;}
|
||||
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
vec3 shadedFogColor = vec3 (0.55, 0.67, 0.88);
|
||||
vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight;
|
||||
moonLightColor = moonlight_perception (moonLightColor);
|
||||
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
//gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0);
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
||||
vec3 u = normalize(ep.xyz - l.xyz);
|
||||
|
||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
gl_Position.x = gl_Vertex.x;
|
||||
gl_Position.y += gl_Vertex.y;
|
||||
gl_Position.z += gl_Vertex.z;
|
||||
gl_Position.xyz += gl_Color.xyz;
|
||||
|
||||
|
||||
// Determine a lighting normal based on the vertex position from the
|
||||
// center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
|
||||
float n = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
|
||||
|
||||
// Determine the position - used for fog and shading calculations
|
||||
vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);
|
||||
float fogCoord = abs(ecPosition.z);
|
||||
float fract = smoothstep(0.0, cloud_height, gl_Position.z + cloud_height);
|
||||
|
||||
vec3 relVector = gl_Position.xyz - ep.xyz;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
|
||||
|
||||
// Light at the final position
|
||||
|
||||
// first obtain normal to sun position
|
||||
|
||||
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
|
||||
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
|
||||
|
||||
// yprime is the distance of the vertex into sun direction, corrected for altitude
|
||||
//float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0);
|
||||
float vertex_alt = altitude + relVector.z;
|
||||
float yprime = -dot(relVector, lightHorizon);
|
||||
float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
|
||||
// compute the light at the position
|
||||
//vec4 light_diffuse;
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
//light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0);
|
||||
//light_diffuse.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
//light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
//light_diffuse.a = 1.0;
|
||||
|
||||
float light_intensity = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
vec4 light_diffuse = vec4 (0.57, 0.57, 0.9, 1.0);
|
||||
light_diffuse.rgb = light_intensity * light_diffuse.rgb;
|
||||
|
||||
float intensity = length(light_diffuse.rgb);
|
||||
//light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, cloud_self_shading ))));
|
||||
|
||||
// Determine the shading of the sprite based on its vertical position and position relative to the sun.
|
||||
n = min(smoothstep(-0.5, 0.0, n), fract);
|
||||
// Determine the shading based on a mixture from the backlight to the front
|
||||
vec4 backlight = light_diffuse * shade;
|
||||
|
||||
gl_FrontColor = mix(backlight, light_diffuse, n);
|
||||
gl_FrontColor += gl_FrontLightModelProduct.sceneColor;
|
||||
|
||||
// As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
|
||||
gl_FrontColor.a = 0.2 * min(smoothstep(100.0, 250.0, fogCoord), 1.0 - smoothstep(250000.0, 300000.0, fogCoord));
|
||||
// During the day, noctilucent clouds are invisible
|
||||
gl_FrontColor.a = gl_FrontColor.a * (1.0 - smoothstep(4.0,8.0,lightArg));
|
||||
|
||||
|
||||
// Fog doesn't affect rain as much as other objects.
|
||||
//fogFactor = exp( -gl_Fog.density * fogCoord * 0.4);
|
||||
//fogFactor = clamp(fogFactor, 0.0, 1.0);
|
||||
|
||||
float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0);
|
||||
if (fadeScale < 0.05) fadeScale = 0.05;
|
||||
fogFactor = exp( -gl_Fog.density * fogCoord * fadeScale);
|
||||
|
||||
hazeColor = light_diffuse.rgb;
|
||||
hazeColor.r = hazeColor.r * 0.83;
|
||||
hazeColor.g = hazeColor.g * 0.9;
|
||||
|
||||
// in sunset or sunrise conditions, do extra shading of clouds
|
||||
|
||||
|
||||
|
||||
// two times terminator width governs how quickly light fades into shadow
|
||||
float terminator_width = 200000.0;
|
||||
|
||||
// now dim the light
|
||||
float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1;
|
||||
|
||||
if (earthShade < 0.8)
|
||||
{
|
||||
intensity = length(light_diffuse.rgb);
|
||||
gl_FrontColor.rgb = intensity * normalize(mix(gl_FrontColor.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade ) ));
|
||||
}
|
||||
|
||||
hazeColor = hazeColor * earthShade;
|
||||
gl_FrontColor.rgb = gl_FrontColor.rgb * earthShade;
|
||||
gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
|
||||
hazeColor.rgb = hazeColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
|
||||
gl_BackColor = gl_FrontColor;
|
||||
|
||||
}
|
156
Compositor/Shaders/ALS/cloud-shadowfunc.frag
Normal file
156
Compositor/Shaders/ALS/cloud-shadowfunc.frag
Normal file
|
@ -0,0 +1,156 @@
|
|||
#version 120
|
||||
uniform float cloudpos1_x;
|
||||
uniform float cloudpos1_y;
|
||||
uniform float cloudpos2_x;
|
||||
uniform float cloudpos2_y;
|
||||
uniform float cloudpos3_x;
|
||||
uniform float cloudpos3_y;
|
||||
uniform float cloudpos4_x;
|
||||
uniform float cloudpos4_y;
|
||||
uniform float cloudpos5_x;
|
||||
uniform float cloudpos5_y;
|
||||
uniform float cloudpos6_x;
|
||||
uniform float cloudpos6_y;
|
||||
uniform float cloudpos7_x;
|
||||
uniform float cloudpos7_y;
|
||||
uniform float cloudpos8_x;
|
||||
uniform float cloudpos8_y;
|
||||
uniform float cloudpos9_x;
|
||||
uniform float cloudpos9_y;
|
||||
uniform float cloudpos10_x;
|
||||
uniform float cloudpos10_y;
|
||||
uniform float cloudpos11_x;
|
||||
uniform float cloudpos11_y;
|
||||
uniform float cloudpos12_x;
|
||||
uniform float cloudpos12_y;
|
||||
uniform float cloudpos13_x;
|
||||
uniform float cloudpos13_y;
|
||||
uniform float cloudpos14_x;
|
||||
uniform float cloudpos14_y;
|
||||
uniform float cloudpos15_x;
|
||||
uniform float cloudpos15_y;
|
||||
uniform float cloudpos16_x;
|
||||
uniform float cloudpos16_y;
|
||||
uniform float cloudpos17_x;
|
||||
uniform float cloudpos17_y;
|
||||
uniform float cloudpos18_x;
|
||||
uniform float cloudpos18_y;
|
||||
uniform float cloudpos19_x;
|
||||
uniform float cloudpos19_y;
|
||||
uniform float cloudpos20_x;
|
||||
uniform float cloudpos20_y;
|
||||
|
||||
uniform float cloudpos_n_x;
|
||||
uniform float cloudpos_n_y;
|
||||
|
||||
float shadow_func (in float x, in float y, in float noise, in float dist)
|
||||
{
|
||||
|
||||
if (dist > 30000.0) {return 1.0;}
|
||||
|
||||
float width = fract((cloudpos1_x)) * 5000.0;
|
||||
float strength = fract((cloudpos1_y));
|
||||
|
||||
|
||||
float dlength = length( vec2 (x - cloudpos1_x, y - cloudpos1_y));
|
||||
float shadeValue = strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos2_x, y - cloudpos2_y));
|
||||
width = fract((cloudpos2_x)) * 5000.0; strength = fract((cloudpos2_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos3_x, y - cloudpos3_y));
|
||||
width = fract((cloudpos3_x)) * 5000.0; strength = fract((cloudpos3_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos4_x, y - cloudpos4_y));
|
||||
width = fract((cloudpos4_x)) * 5000.0; strength = fract((cloudpos4_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos5_x, y - cloudpos5_y));
|
||||
width = fract((cloudpos5_x)) * 5000.0; strength = fract((cloudpos5_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos6_x, y - cloudpos6_y));
|
||||
width = fract((cloudpos6_x)) * 5000.0; strength = fract((cloudpos6_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos7_x, y - cloudpos7_y));
|
||||
width = fract((cloudpos7_x)) * 5000.0; strength = fract((cloudpos7_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos8_x, y - cloudpos8_y));
|
||||
width = fract((cloudpos8_x)) * 5000.0; strength = fract((cloudpos8_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos9_x, y - cloudpos9_y));
|
||||
width = fract((cloudpos9_x)) * 5000.0; strength = fract((cloudpos9_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos10_x, y - cloudpos10_y));
|
||||
width = fract((cloudpos10_x)) * 5000.0; strength = fract((cloudpos10_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos11_x, y - cloudpos11_y));
|
||||
width = fract((cloudpos11_x)) * 5000.0; strength = fract((cloudpos11_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos12_x, y - cloudpos12_y));
|
||||
width = fract((cloudpos12_x)) * 5000.0; strength = fract((cloudpos12_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos13_x, y - cloudpos13_y));
|
||||
width = fract((cloudpos13_x)) * 5000.0; strength = fract((cloudpos13_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos14_x, y - cloudpos14_y));
|
||||
width = fract((cloudpos14_x)) * 5000.0; strength = fract((cloudpos14_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos15_x, y - cloudpos15_y));
|
||||
width = fract((cloudpos15_x)) * 5000.0; strength = fract((cloudpos15_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos16_x, y - cloudpos16_y));
|
||||
width = fract((cloudpos16_x)) * 5000.0; strength = fract((cloudpos16_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos17_x, y - cloudpos17_y));
|
||||
width = fract((cloudpos17_x)) * 5000.0; strength = fract((cloudpos17_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos18_x, y - cloudpos18_y));
|
||||
width = fract((cloudpos18_x)) * 5000.0; strength = fract((cloudpos18_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos19_x, y - cloudpos19_y));
|
||||
width = fract((cloudpos19_x)) * 5000.0; strength = fract((cloudpos19_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
dlength = length ( vec2 (x - cloudpos20_x, y - cloudpos20_y));
|
||||
width = fract((cloudpos20_x)) * 5000.0; strength = fract((cloudpos20_y));
|
||||
shadeValue = shadeValue + strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
shadeValue = shadeValue * (0.8 + 2.0 * shadeValue * smoothstep(0.4,0.6,noise));
|
||||
shadeValue = clamp(shadeValue,0.0,1.0);
|
||||
shadeValue = shadeValue * (1.0 - smoothstep(15000.0, 30000.0,dist));
|
||||
|
||||
return 1.0 - shadeValue;
|
||||
|
||||
}
|
||||
|
||||
|
||||
float shadow_func_nearest (in float x, in float y, in float noise, in float dist)
|
||||
{
|
||||
|
||||
if (dist > 6000.0) {return 1.0;}
|
||||
|
||||
float width = fract((cloudpos_n_x)) * 5000.0;
|
||||
float strength = fract((cloudpos_n_y));
|
||||
|
||||
|
||||
float dlength = length( vec2 (x - cloudpos_n_x, y - cloudpos_n_y));
|
||||
float shadeValue = strength * (1.0-smoothstep(width * 0.5, width, dlength));
|
||||
|
||||
return 1.0 - shadeValue;
|
||||
}
|
59
Compositor/Shaders/ALS/cloud-static-detailed.frag
Normal file
59
Compositor/Shaders/ALS/cloud-static-detailed.frag
Normal file
|
@ -0,0 +1,59 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
|
||||
uniform float ring_factor;
|
||||
uniform float rainbow_factor;
|
||||
|
||||
varying float fogFactor;
|
||||
varying float mie_frag;
|
||||
varying float eShade;
|
||||
|
||||
varying vec3 hazeColor;
|
||||
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
||||
|
||||
float fwd_enhancement = smoothstep(0.8, 1.0, mie_frag) * eShade;
|
||||
float light_intensity = length(gl_Color.rgb)/1.76;
|
||||
|
||||
|
||||
//22 deg ring
|
||||
|
||||
float halo_ring_enhancement = smoothstep (0.88, 0.927, mie_frag) * (1.0 - smoothstep(0.927, 0.94, mie_frag)) * eShade * 1.5 * ring_factor;
|
||||
|
||||
|
||||
float halo_ring_enhancement_b = smoothstep (0.88, 0.90, mie_frag) * (1.0 - smoothstep(0.90, 0.92, mie_frag)) * eShade * ring_factor;
|
||||
float halo_ring_enhancement_r = smoothstep (0.91, 0.93, mie_frag) * (1.0 - smoothstep(0.93, 0.955, mie_frag)) * eShade * ring_factor;
|
||||
|
||||
|
||||
vec4 finalColor = base * gl_Color;
|
||||
|
||||
float reduction = 0.16 * light_intensity * rainbow_factor;
|
||||
|
||||
finalColor.g *= (1.0 - reduction * halo_ring_enhancement_r);
|
||||
finalColor.b *= (1.0 - reduction * halo_ring_enhancement_r);
|
||||
|
||||
finalColor.r *= (1.0 - reduction * halo_ring_enhancement_b);
|
||||
finalColor.g *= (1.0 - reduction * halo_ring_enhancement_b);
|
||||
|
||||
fwd_enhancement *=(1.0-smoothstep(0.8, 1.0, light_intensity));
|
||||
finalColor.rgb *= (1.0 + fwd_enhancement) * (1.0 + 0.5 * halo_ring_enhancement * (1.0-smoothstep(0.8, 1.0, light_intensity))) ;
|
||||
finalColor.a *= (1.0 + 0.5 * halo_ring_enhancement);
|
||||
|
||||
|
||||
|
||||
finalColor.rgb = clamp(finalColor.rgb, 0.0, 1.0);
|
||||
finalColor.a = clamp(finalColor.a, 0.0, 1.0);
|
||||
|
||||
vec4 fragColor = vec4 (mix(hazeColor, finalColor.rgb, fogFactor ), mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor)));
|
||||
|
||||
|
||||
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||
//fragColor.rgb = vec3 (1.0, 0.0, 0.0);
|
||||
gl_FragColor = fragColor;
|
||||
}
|
142
Compositor/Shaders/ALS/cloud-static-detailed.vert
Normal file
142
Compositor/Shaders/ALS/cloud-static-detailed.vert
Normal file
|
@ -0,0 +1,142 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
varying float fogFactor;
|
||||
varying float mie_frag;
|
||||
varying float eShade;
|
||||
varying vec3 hazeColor;
|
||||
|
||||
uniform float terminator;
|
||||
uniform float altitude;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float moonlight;
|
||||
|
||||
const float shade = 1.0;
|
||||
const float cloud_height = 1000.0;
|
||||
const float EarthRadius = 5800000.0;
|
||||
|
||||
// light_func is a generalized logistic function fit to the light intensity as a function
|
||||
// of scaled terminator position obtained from Flightgear core
|
||||
|
||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||
{
|
||||
x = x-0.5;
|
||||
|
||||
// use the asymptotics to shorten computations
|
||||
if (x > 30.0) {return e;}
|
||||
if (x < -15.0) {return 0.03;}
|
||||
|
||||
|
||||
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
vec3 shadedFogColor = vec3 (0.55, 0.67, 0.88);
|
||||
vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight;
|
||||
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
//gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0);
|
||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
||||
vec3 u = normalize(ep.xyz - l.xyz);
|
||||
|
||||
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
gl_Position.x = gl_Vertex.x;
|
||||
gl_Position.y += gl_Vertex.y;
|
||||
gl_Position.z += gl_Vertex.z;
|
||||
gl_Position.xyz += gl_Color.xyz;
|
||||
|
||||
|
||||
// Determine a lighting normal based on the vertex position from the
|
||||
// center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
|
||||
float n = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
|
||||
|
||||
// Determine the position - used for fog and shading calculations
|
||||
vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);
|
||||
float fogCoord = abs(ecPosition.z);
|
||||
float fract = smoothstep(0.0, cloud_height, gl_Position.z + cloud_height);
|
||||
|
||||
vec3 relVector = gl_Position.xyz - ep.xyz;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
|
||||
|
||||
// Light at the final position
|
||||
|
||||
// first obtain normal to sun position
|
||||
|
||||
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
|
||||
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
|
||||
|
||||
|
||||
mie_frag = dot(normalize(lightFull), normalize(relVector));
|
||||
|
||||
|
||||
// yprime is the distance of the vertex into sun direction, corrected for altitude
|
||||
//float vertex_alt = max(altitude * 0.30480 + relVector.z,100.0);
|
||||
float vertex_alt = altitude + relVector.z;
|
||||
float yprime = -dot(relVector, lightHorizon);
|
||||
float yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
|
||||
|
||||
// compute the light at the position
|
||||
vec4 light_diffuse;
|
||||
|
||||
float lightArg = (terminator-yprime_alt)/100000.0;
|
||||
|
||||
light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 2.227, 1.08e-05, 1.0);
|
||||
light_diffuse.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
|
||||
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
|
||||
light_diffuse.a = 1.0;
|
||||
|
||||
float intensity = length(light_diffuse.rgb);
|
||||
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, (1.0 - smoothstep(0.5,0.9, cloud_self_shading ))));
|
||||
|
||||
// Determine the shading of the sprite based on its vertical position and position relative to the sun.
|
||||
n = min(smoothstep(-0.5, 0.0, n), fract);
|
||||
// Determine the shading based on a mixture from the backlight to the front
|
||||
vec4 backlight = light_diffuse * shade;
|
||||
|
||||
gl_FrontColor = mix(backlight, light_diffuse, n);
|
||||
gl_FrontColor += gl_FrontLightModelProduct.sceneColor;
|
||||
|
||||
// As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
|
||||
gl_FrontColor.a = min(smoothstep(100.0, 250.0, fogCoord), 1.0 - smoothstep(70000.0, 75000.0, fogCoord));
|
||||
|
||||
// Fog doesn't affect rain as much as other objects.
|
||||
//fogFactor = exp( -gl_Fog.density * fogCoord * 0.4);
|
||||
//fogFactor = clamp(fogFactor, 0.0, 1.0);
|
||||
|
||||
float fadeScale = 0.05 + 0.2 * log(fogCoord/1000.0);
|
||||
if (fadeScale < 0.05) fadeScale = 0.05;
|
||||
fogFactor = exp( -gl_Fog.density * fogCoord * fadeScale);
|
||||
|
||||
hazeColor = light_diffuse.rgb;
|
||||
hazeColor.r = hazeColor.r * 0.83;
|
||||
hazeColor.g = hazeColor.g * 0.9;
|
||||
|
||||
// in sunset or sunrise conditions, do extra shading of clouds
|
||||
|
||||
|
||||
|
||||
// two times terminator width governs how quickly light fades into shadow
|
||||
float terminator_width = 200000.0;
|
||||
|
||||
// now dim the light
|
||||
float earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, yprime_alt) + 0.1;
|
||||
|
||||
eShade = earthShade;
|
||||
|
||||
if (earthShade < 0.8)
|
||||
{
|
||||
intensity = length(light_diffuse.rgb);
|
||||
gl_FrontColor.rgb = intensity * normalize(mix(gl_FrontColor.rgb, shadedFogColor, 1.0 -smoothstep(0.1, 0.8,earthShade ) ));
|
||||
}
|
||||
|
||||
hazeColor = hazeColor * earthShade;
|
||||
gl_FrontColor.rgb = gl_FrontColor.rgb * earthShade;
|
||||
gl_FrontColor.rgb = gl_FrontColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
|
||||
hazeColor.rgb = hazeColor.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
|
||||
gl_BackColor = gl_FrontColor;
|
||||
|
||||
}
|
20
Compositor/Shaders/ALS/cloud-static.frag
Normal file
20
Compositor/Shaders/ALS/cloud-static.frag
Normal file
|
@ -0,0 +1,20 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
varying vec3 hazeColor;
|
||||
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
||||
vec4 finalColor = base * gl_Color;
|
||||
|
||||
vec4 fragColor = vec4 (mix(hazeColor, finalColor.rgb, fogFactor ), mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor)));
|
||||
|
||||
|
||||
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||
gl_FragColor = fragColor;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue