Merge branch 'master' of gitorious.org:fg/fgdata
This commit is contained in:
commit
9dc155f832
3 changed files with 81 additions and 19 deletions
|
@ -88,10 +88,14 @@
|
||||||
<heading-deg>
|
<heading-deg>
|
||||||
<use>/environment/Vinson/hdg-deg</use>
|
<use>/environment/Vinson/hdg-deg</use>
|
||||||
</heading-deg>
|
</heading-deg>
|
||||||
|
|
||||||
<rendering-hint>transparent</rendering-hint>
|
|
||||||
<shade-model>smooth</shade-model>
|
<shade-model>smooth</shade-model>
|
||||||
|
<rendering-hint>transparent</rendering-hint>
|
||||||
|
<transparent>true</transparent>
|
||||||
|
<render-bin>
|
||||||
|
<bin-number type="int">6</bin-number>
|
||||||
|
<bin-name>DepthSortedBin</bin-name>
|
||||||
|
</render-bin>
|
||||||
|
|
||||||
<!-- fog include -->
|
<!-- fog include -->
|
||||||
<visibility>
|
<visibility>
|
||||||
<use>/environment/ground-visibility-m</use>
|
<use>/environment/ground-visibility-m</use>
|
||||||
|
@ -527,14 +531,14 @@
|
||||||
</alpha-test>
|
</alpha-test>
|
||||||
<shade-model>smooth</shade-model>
|
<shade-model>smooth</shade-model>
|
||||||
<cull-face>back</cull-face>
|
<cull-face>back</cull-face>
|
||||||
<!--<render-bin>
|
<render-bin>
|
||||||
<bin-number>
|
<bin-number>
|
||||||
<use>render-bin/bin-number</use>
|
<use>render-bin/bin-number</use>
|
||||||
</bin-number>
|
</bin-number>
|
||||||
<bin-name>
|
<bin-name>
|
||||||
<use>render-bin/bin-name</use>
|
<use>render-bin/bin-name</use>
|
||||||
</bin-name>
|
</bin-name>
|
||||||
</render-bin>-->
|
</render-bin>
|
||||||
<texture-unit>
|
<texture-unit>
|
||||||
<unit>0</unit>
|
<unit>0</unit>
|
||||||
<type>noise</type>
|
<type>noise</type>
|
||||||
|
|
|
@ -91,8 +91,13 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<!-- END Reflection -->
|
<!-- END Reflection -->
|
||||||
<!-- Dirt -->
|
<!-- Dirt -->
|
||||||
<dirt-enabled type="int">0</dirt-enabled>
|
<dirt-enabled type="int">0</dirt-enabled>
|
||||||
<dirt-color type="vec3d">0.0 0.0 0.0</dirt-color>
|
<dirt-multi type="int">0</dirt-multi>
|
||||||
<dirt-factor type="float">0.0</dirt-factor>
|
<dirt-color type="vec3d" n="0">0.0 0.0 0.0</dirt-color>
|
||||||
|
<dirt-factor type="float" n="0">0.0</dirt-factor>
|
||||||
|
<dirt-color type="vec3d" n="1">0.0 0.0 0.0</dirt-color>
|
||||||
|
<dirt-factor type="float" n="1">0.0</dirt-factor>
|
||||||
|
<dirt-color type="vec3d" n="2">0.0 0.0 0.0</dirt-color>
|
||||||
|
<dirt-factor type="float" n="2">0.0</dirt-factor>
|
||||||
<!-- ambient correction -->
|
<!-- ambient correction -->
|
||||||
<ambient-correction type="float">0.05</ambient-correction>
|
<ambient-correction type="float">0.05</ambient-correction>
|
||||||
<!-- quality slider -->
|
<!-- quality slider -->
|
||||||
|
@ -602,20 +607,61 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
</uniform>
|
</uniform>
|
||||||
|
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>dirt_color</name>
|
<name>dirt_multi</name>
|
||||||
<type>float-vec3</type>
|
<type>int</type>
|
||||||
<value>
|
<value>
|
||||||
<use>dirt-color</use>
|
<use>dirt-multi</use>
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
|
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>dirt_factor</name>
|
<name>dirt_r_color</name>
|
||||||
<type>float</type>
|
<type>float-vec3</type>
|
||||||
<value>
|
<value>
|
||||||
<use>dirt-factor</use>
|
<use>dirt-color[0]</use>
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</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>
|
||||||
|
|
||||||
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
|
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>amb_correction</name>
|
<name>amb_correction</name>
|
||||||
|
|
|
@ -32,6 +32,7 @@ uniform int lightmap_enabled;
|
||||||
uniform int lightmap_multi;
|
uniform int lightmap_multi;
|
||||||
uniform int shader_qual;
|
uniform int shader_qual;
|
||||||
uniform int dirt_enabled;
|
uniform int dirt_enabled;
|
||||||
|
uniform int dirt_multi;
|
||||||
|
|
||||||
uniform float lightmap_r_factor;
|
uniform float lightmap_r_factor;
|
||||||
uniform float lightmap_g_factor;
|
uniform float lightmap_g_factor;
|
||||||
|
@ -42,14 +43,18 @@ uniform float refl_fresnel;
|
||||||
uniform float refl_rainbow;
|
uniform float refl_rainbow;
|
||||||
uniform float refl_noise;
|
uniform float refl_noise;
|
||||||
uniform float amb_correction;
|
uniform float amb_correction;
|
||||||
uniform float dirt_factor;
|
uniform float dirt_r_factor;
|
||||||
|
uniform float dirt_g_factor;
|
||||||
|
uniform float dirt_b_factor;
|
||||||
|
|
||||||
uniform vec3 lightmap_r_color;
|
uniform vec3 lightmap_r_color;
|
||||||
uniform vec3 lightmap_g_color;
|
uniform vec3 lightmap_g_color;
|
||||||
uniform vec3 lightmap_b_color;
|
uniform vec3 lightmap_b_color;
|
||||||
uniform vec3 lightmap_a_color;
|
uniform vec3 lightmap_a_color;
|
||||||
|
|
||||||
uniform vec3 dirt_color;
|
uniform vec3 dirt_r_color;
|
||||||
|
uniform vec3 dirt_g_color;
|
||||||
|
uniform vec3 dirt_b_color;
|
||||||
|
|
||||||
///fog include//////////////////////
|
///fog include//////////////////////
|
||||||
uniform int fogType;
|
uniform int fogType;
|
||||||
|
@ -151,10 +156,17 @@ void main (void)
|
||||||
//begin DIRT
|
//begin DIRT
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
if (dirt_enabled > 0.0){
|
if (dirt_enabled > 0.0){
|
||||||
vec3 dirtColor = dirt_color * noisevec.rgb;
|
float dirtFactorR = reflmap.r * dirt_r_factor;
|
||||||
float dirtFactor = reflmap.r * dirt_factor;
|
dirtFactorR = smoothstep(0.0, 1.0, dirtFactorR);
|
||||||
dirtFactor = smoothstep(0.0, 1.0, dirtFactor);
|
fragColor.rgb = mix(fragColor.rgb, dirt_r_color, dirtFactorR);
|
||||||
fragColor.rgb = mix(fragColor.rgb, dirtColor, dirtFactor);
|
if (dirt_multi > 0) {
|
||||||
|
float dirtFactorG = reflmap.g * dirt_g_factor;
|
||||||
|
float dirtFactorB = reflmap.b * dirt_b_factor;
|
||||||
|
dirtFactorG = smoothstep(0.0, 1.0, dirtFactorG);
|
||||||
|
dirtFactorB = smoothstep(0.0, 1.0, dirtFactorB);
|
||||||
|
fragColor.rgb = mix(fragColor.rgb, dirt_g_color, dirtFactorG);
|
||||||
|
fragColor.rgb = mix(fragColor.rgb, dirt_b_color, dirtFactorB);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
//END Dirt
|
//END Dirt
|
||||||
|
|
Loading…
Add table
Reference in a new issue