Make random buildings compatible with the atmospheric scattering shader.
Also remove redundant test parameters from the tree effect.
This commit is contained in:
parent
83e96a30c2
commit
2f123b7100
2 changed files with 230 additions and 62 deletions
|
@ -3,73 +3,243 @@
|
|||
<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>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<!-- Normal Map -->
|
||||
<normalmap-enabled type="int"> 0 </normalmap-enabled>
|
||||
<normalmap-dds type="int"> 0 </normalmap-dds>
|
||||
<normalmap-tiling type="float"> 1.0 </normalmap-tiling>
|
||||
<!-- Light Map -->
|
||||
<texture n="3">
|
||||
<image>Textures/buildings-lightmap.png</image>
|
||||
<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.10 </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>
|
||||
<!--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.0</shininess>
|
||||
<color-mode>ambient-and-diffuse</color-mode>
|
||||
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
||||
<!-- DIFFUSE -->
|
||||
<texture n="0">
|
||||
<type>2d</type>
|
||||
<image>Textures/buildings.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<!-- Normal Map -->
|
||||
<normalmap-enabled type="int"> 0 </normalmap-enabled>
|
||||
<normalmap-dds type="int"> 0 </normalmap-dds>
|
||||
<normalmap-tiling type="float"> 1.0 </normalmap-tiling>
|
||||
<!-- Light Map -->
|
||||
<texture n="3">
|
||||
<image>Textures/buildings-lightmap.png</image>
|
||||
<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.10 </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>
|
||||
<!--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.0</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>
|
||||
<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>
|
||||
<mysnow_level><use>/environment/mysnow-level-m</use></mysnow_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>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
||||
<!-- Atmospheric scattering technique -->
|
||||
<technique n="5">
|
||||
<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>
|
||||
<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 n="0">Shaders/include_fog.vert</vertex-shader>
|
||||
<vertex-shader n="1">Shaders/default.vert</vertex-shader>
|
||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
||||
<fragment-shader n="1">Shaders/terrain-nocolor.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>
|
||||
<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>
|
||||
<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/terrain-haze.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/terrain-haze.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>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</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>
|
||||
|
||||
<technique n="8">
|
||||
<pass>
|
||||
|
@ -115,4 +285,4 @@
|
|||
</texture-unit>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
||||
</PropertyList>
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
<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>
|
||||
<render-bin-number><use>/sim/rendering/tree-bin</use></render-bin-number>
|
||||
<render-bin-name><use>/sim/rendering/tree-bin-name</use></render-bin-name>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
||||
|
|
Loading…
Reference in a new issue