1
0
Fork 0

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:
Emilian Huminiuc 2012-05-07 01:59:52 +03:00
parent 50b63efab3
commit 22352ec485
2 changed files with 106 additions and 140 deletions

View file

@ -1,145 +1,111 @@
<?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>
<parameters> <inherits-from>Effects/model-combined-deferred</inherits-from>
<texture n="0"> <parameters>
<active>true</active> <!-- Normal Map -->
<type>2d</type> <normalmap-enabled type="int"> 0 </normalmap-enabled>
<internal-format>normalized</internal-format> <normalmap-dds type="int"> 0 </normalmap-dds>
<filter>linear-mipmap-linear</filter> <normalmap-tiling type="float"> 1.0 </normalmap-tiling>
<wrap-s>clamp</wrap-s> <!-- Light Map -->
<wrap-t>clamp</wrap-t> <texture n="3">
</texture> <image>Textures/buildings-lightmap.png</image>
<texture n="1"> <filter>linear-mipmap-linear</filter>
<active>true</active> <wrap-s>clamp</wrap-s>
<type>2d</type> <wrap-t>clamp</wrap-t>
<internal-format>normalized</internal-format> <internal-format>normalized</internal-format>
<filter>linear-mipmap-linear</filter> </texture>
<wrap-s>clamp</wrap-s> <lightmap-enabled type="int"> 1 </lightmap-enabled>
<wrap-t>clamp</wrap-t> <lightmap-multi type="int"> 0 </lightmap-multi>
</texture> <lightmap-factor type="float" n="0">
<transparent>false</transparent> <use>/sim/time/sun-angle-rad</use>
<material> </lightmap-factor>
<active>true</active> <lightmap-color type="vec3d" n="0"> 0.3 0.3 0.3 </lightmap-color>
<color-mode-uniform>1</color-mode-uniform> <!--<lightmap-factor type="float" n="1">1.0</lightmap-factor>
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient> <lightmap-color type="vec3d" n="1"> 1.0 1.0 1.0 </lightmap-color>
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse> <lightmap-factor type="float" n="2">1.0</lightmap-factor>
<specular type="vec4d">0.0 0.0 0.0 1.0</specular> <lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color>
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive> <lightmap-factor type="float" n="3">1.0</lightmap-factor>
<shininess>0.0</shininess> <lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>-->
<color-mode>ambient-and-diffuse</color-mode> <!-- Reflection -->
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform> <reflection-enabled type="int"> 1 </reflection-enabled>
<!-- DIFFUSE --> <reflect-map-enabled type="int"> 1 </reflect-map-enabled>
</material> <reflection-correction type="float"> 0.10 </reflection-correction>
<material-id>0</material-id> <reflection-dynamic type="int"> 0 </reflection-dynamic>
<blend> <reflection-fresnel type="float"> 0.0 </reflection-fresnel>
<active>0</active> <reflection-rainbow type="float"> 0.0 </reflection-rainbow>
<source>0</source> <reflection-noise type="float"> 0.0 </reflection-noise>
<destination>0</destination> <!--Ambient correction -->
</blend> <ambient-correction type="float"> 0.0 </ambient-correction>
<shade-model>flat</shade-model> <dirt-enabled type="int"> 0 </dirt-enabled>
<cull-face>back</cull-face> <dirt-color type="vec3d"> 0.0 0.0 0.0 </dirt-color>
<rendering-hint>opaque</rendering-hint> <dirt-factor type="float"> 0.0 </dirt-factor>
<vertex-program-two-side>false</vertex-program-two-side> <material>
<!-- fog include --> <active>true</active>
<visibility> <color-mode-uniform>1</color-mode-uniform>
<use>/environment/ground-visibility-m</use> <ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
</visibility> <diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
<avisibility> <specular type="vec4d">0.0 0.0 0.0 1.0</specular>
<use>/environment/visibility-m</use> <emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
</avisibility> <shininess>0.0</shininess>
<lthickness> <color-mode>ambient-and-diffuse</color-mode>
<use>/environment/ground-haze-thickness-m</use> <color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
</lthickness> <!-- DIFFUSE -->
<scattering> </material>
<use>/rendering/scene/scattering</use> <material-id>0</material-id>
</scattering> <blend>
<terminator> <active>0</active>
<use>/environment/terminator-relative-position-m</use> <source>0</source>
</terminator> <destination>0</destination>
<fogtype> </blend>
<use>/sim/rendering/shaders/skydome</use> <shade-model>flat</shade-model>
</fogtype> <cull-face>back</cull-face>
<!-- END fog include --> <rendering-hint>opaque</rendering-hint>
<sun-angle> </parameters>
<use>/sim/time/sun-angle-rad</use>
</sun-angle>
</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"> <image>
<vertex-shader n="0">Shaders/terrain-haze.vert</vertex-shader> <use>texture[3]/image</use>
<fragment-shader n="0">Shaders/terrain-haze.frag</fragment-shader> </image>
</program> <filter>
</pass> <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>
</pass>
</technique> </technique>
<technique n="9">
<!-- Rembrandt --> <pass>
<!-- FredB: What is the purpose of that ? --> <texture-unit n="4">
<technique n="10"> <unit>4</unit>
<pass n="0"> <image>
<program n="0"> <use>texture[3]/image</use>
<vertex-shader n="0">Shaders/deferred-gbuffer.vert</vertex-shader> </image>
<fragment-shader n="0">Shaders/deferred-gbuffer.frag</fragment-shader> <filter>
<fragment-shader n="1">Shaders/gbuffer-functions.frag</fragment-shader> <use>texture[3]/filter</use>
<fragment-shader n="2">Shaders/gbuffer-encode.frag</fragment-shader> </filter>
</program> <wrap-s>
</pass> <use>texture[3]/wrap-s</use>
</technique> </wrap-s>
<wrap-t>
<!-- Default shader --> <use>texture[3]/wrap-t</use>
<technique n="11"> </wrap-t>
<pass n="0"> <internal-format>
<texture-unit n="1"> <use>texture[3]/internal-format</use>
<!-- Emissive texture--> </internal-format>
<unit>1</unit> </texture-unit>
<!-- If there is a texture, the type in the derived effect </pass>
will be "2d". -->
<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>
<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>
</technique> </technique>
</PropertyList> </PropertyList>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 KiB

After

Width:  |  Height:  |  Size: 850 KiB