1
0
Fork 0

Compositor: Fix EarthView with ALS pipeline

This commit is contained in:
Fernando García Liñán 2020-04-04 18:12:20 +02:00
parent e1e0cf5997
commit c0e2b243f6
5 changed files with 376 additions and 370 deletions

View file

@ -305,7 +305,7 @@ please see Docs/README.model-combined.eff for documentation
<binormal type="int">7</binormal>
</generate>-->
<!-- Default rendering -->
<technique n="7">
<technique n="4">
<predicate>
<and>
<property>/sim/rendering/shaders/quality-level</property>
@ -843,7 +843,7 @@ please see Docs/README.model-combined.eff for documentation
</uniform>
</pass>
</technique>
<technique n="4">
<technique n="7">
<scheme>als-lighting</scheme>
<predicate>
<and>

View file

@ -86,7 +86,86 @@
<normal type="int">15</normal>
<tangent type="int">6</tangent>
</generate>
<technique n="8">
<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>
<technique n="19">
<scheme>als-lighting</scheme>
<predicate>
<or>
<less-equal>
@ -360,82 +439,4 @@
</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>

View file

@ -90,293 +90,7 @@
<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">
<technique n="9">
<pass>
<lighting>true</lighting>
<material>
@ -454,7 +168,8 @@
-->
</pass>
</technique>
<technique n="9">
<technique n="18">
<scheme>als-lighting</scheme>
<predicate>
<and>
<or>
@ -755,4 +470,291 @@
</uniform>
</pass>
</technique>
<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>
<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>
</PropertyList>

View file

@ -15,6 +15,7 @@
<use_geo_light type="int">0</use_geo_light>
</parameters>
<technique n="5">
<scheme>als-lighting</scheme>
<pass>
<program>
<vertex-shader n="0">Shaders/ALS/space-ultra.vert</vertex-shader>
@ -951,6 +952,7 @@
</pass>
</technique>
<technique n="6">
<scheme>als-lighting</scheme>
<pass>
<program>
<vertex-shader n="0">Shaders/ALS/space-base.vert</vertex-shader>

View file

@ -3,7 +3,8 @@
<PropertyList>
<name>Effects/space</name>
<inherits-from>Effects/model-default</inherits-from>
<technique n="7">
<technique n="18">
<scheme>als-lighting</scheme>
<pass>
<program>
<vertex-shader n="0">Shaders/ALS/space-base.vert</vertex-shader>