Switch building.eff to the ubershader.
Tweak building lightmap to work with ubershader. Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
This commit is contained in:
parent
50b63efab3
commit
22352ec485
2 changed files with 106 additions and 140 deletions
|
@ -1,25 +1,46 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/building</name>
|
<name>Effects/building
|
||||||
<inherits-from>Effects/model-default</inherits-from>
|
</name>
|
||||||
|
<inherits-from>Effects/model-combined-deferred</inherits-from>
|
||||||
<parameters>
|
<parameters>
|
||||||
<texture n="0">
|
<!-- Normal Map -->
|
||||||
<active>true</active>
|
<normalmap-enabled type="int"> 0 </normalmap-enabled>
|
||||||
<type>2d</type>
|
<normalmap-dds type="int"> 0 </normalmap-dds>
|
||||||
<internal-format>normalized</internal-format>
|
<normalmap-tiling type="float"> 1.0 </normalmap-tiling>
|
||||||
|
<!-- Light Map -->
|
||||||
|
<texture n="3">
|
||||||
|
<image>Textures/buildings-lightmap.png</image>
|
||||||
<filter>linear-mipmap-linear</filter>
|
<filter>linear-mipmap-linear</filter>
|
||||||
<wrap-s>clamp</wrap-s>
|
<wrap-s>clamp</wrap-s>
|
||||||
<wrap-t>clamp</wrap-t>
|
<wrap-t>clamp</wrap-t>
|
||||||
</texture>
|
|
||||||
<texture n="1">
|
|
||||||
<active>true</active>
|
|
||||||
<type>2d</type>
|
|
||||||
<internal-format>normalized</internal-format>
|
<internal-format>normalized</internal-format>
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>clamp</wrap-s>
|
|
||||||
<wrap-t>clamp</wrap-t>
|
|
||||||
</texture>
|
</texture>
|
||||||
<transparent>false</transparent>
|
<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>
|
<material>
|
||||||
<active>true</active>
|
<active>true</active>
|
||||||
<color-mode-uniform>1</color-mode-uniform>
|
<color-mode-uniform>1</color-mode-uniform>
|
||||||
|
@ -41,105 +62,50 @@
|
||||||
<shade-model>flat</shade-model>
|
<shade-model>flat</shade-model>
|
||||||
<cull-face>back</cull-face>
|
<cull-face>back</cull-face>
|
||||||
<rendering-hint>opaque</rendering-hint>
|
<rendering-hint>opaque</rendering-hint>
|
||||||
<vertex-program-two-side>false</vertex-program-two-side>
|
|
||||||
<!-- 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 -->
|
|
||||||
<sun-angle>
|
|
||||||
<use>/sim/time/sun-angle-rad</use>
|
|
||||||
</sun-angle>
|
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
<!-- Override some of the default shaders so we can add emissive lighting -->
|
<technique n="8">
|
||||||
<!-- Skydome -->
|
<pass>
|
||||||
<technique n="5">
|
<texture-unit n="4">
|
||||||
<pass n="0">
|
<unit>4</unit>
|
||||||
<program n="0">
|
|
||||||
<vertex-shader n="0">Shaders/terrain-haze.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/terrain-haze.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
<!-- Rembrandt -->
|
|
||||||
<!-- FredB: What is the purpose of that ? -->
|
|
||||||
<technique n="10">
|
|
||||||
<pass n="0">
|
|
||||||
<program n="0">
|
|
||||||
<vertex-shader n="0">Shaders/deferred-gbuffer.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/deferred-gbuffer.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/gbuffer-functions.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/gbuffer-encode.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
<!-- Default shader -->
|
|
||||||
<technique n="11">
|
|
||||||
<pass n="0">
|
|
||||||
<texture-unit n="1">
|
|
||||||
<!-- Emissive texture-->
|
|
||||||
<unit>1</unit>
|
|
||||||
<!-- If there is a texture, the type in the derived effect
|
|
||||||
will be "2d". -->
|
|
||||||
<type>
|
|
||||||
<use>texture[1]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
<image>
|
||||||
<use>texture[1]/image</use>
|
<use>texture[3]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[1]/filter</use>
|
<use>texture[3]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
<wrap-s>
|
<wrap-s>
|
||||||
<use>texture[1]/wrap-s</use>
|
<use>texture[3]/wrap-s</use>
|
||||||
</wrap-s>
|
</wrap-s>
|
||||||
<wrap-t>
|
<wrap-t>
|
||||||
<use>texture[1]/wrap-t</use>
|
<use>texture[3]/wrap-t</use>
|
||||||
</wrap-t>
|
</wrap-t>
|
||||||
<!--
|
|
||||||
<internal-format>
|
<internal-format>
|
||||||
<use>texture[1]/internal-format</use>
|
<use>texture[3]/internal-format</use>
|
||||||
|
</internal-format>
|
||||||
|
</texture-unit>
|
||||||
|
</pass>
|
||||||
|
</technique>
|
||||||
|
<technique n="9">
|
||||||
|
<pass>
|
||||||
|
<texture-unit n="4">
|
||||||
|
<unit>4</unit>
|
||||||
|
<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>
|
</internal-format>
|
||||||
-->
|
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
<program n="0">
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<!--fog include-->
|
|
||||||
<vertex-shader n="1">Shaders/default.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<!--fog include-->
|
|
||||||
<fragment-shader n="1">Shaders/building-default.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform n="9">
|
|
||||||
<name>lightmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform n="10">
|
|
||||||
<name>sunangle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>sun-angle</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
</PropertyList>
|
</PropertyList>
|
Binary file not shown.
Before Width: | Height: | Size: 795 KiB After Width: | Height: | Size: 850 KiB |
Loading…
Reference in a new issue