Another ALS HUD bugfix, cannot have two uniforms named the same
This commit is contained in:
parent
f24ff3ef32
commit
f5be115145
2 changed files with 7 additions and 7 deletions
|
@ -74,7 +74,7 @@
|
|||
<lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
|
||||
<sample-res>0.0006</sample-res>
|
||||
<sample-far>2.5</sample-far>
|
||||
<brightness>1.0</brightness>
|
||||
<hud-brightness>1.0</hud-brightness>
|
||||
</parameters>
|
||||
|
||||
<technique n="4">
|
||||
|
@ -266,9 +266,9 @@
|
|||
<value><use>sample-far</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<name>hud_brightness</name>
|
||||
<type>float</type>
|
||||
<value><use>brightness</use></value>
|
||||
<value><use>hud-brightness</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>scattering</name>
|
||||
|
|
|
@ -39,7 +39,7 @@ uniform float osg_SimulationTime;
|
|||
|
||||
uniform float sample_res;
|
||||
uniform float sample_far;
|
||||
uniform float brightness;
|
||||
uniform float hud_brightness;
|
||||
|
||||
uniform int use_reflection;
|
||||
uniform int use_reflection_lightmap;
|
||||
|
@ -89,9 +89,9 @@ texel+= 0.5 * texture2D(texture, vec2 (gl_TexCoord[0].s + sample_res, gl_TexCoor
|
|||
|
||||
texel/=10.0;
|
||||
|
||||
float threshold_high = max(brightness, 0.05) * 0.7;
|
||||
float threshold_low = max(brightness, 0.05) * 0.4;
|
||||
float threshold_mid = max(brightness, 0.05) * 0.5;
|
||||
float threshold_high = max(hud_brightness, 0.05) * 0.7;
|
||||
float threshold_low = max(hud_brightness, 0.05) * 0.4;
|
||||
float threshold_mid = max(hud_brightness, 0.05) * 0.5;
|
||||
|
||||
texel.rgb = mix(texel.rgb, vec3 (1.0, 1.0, 1.0), smoothstep(threshold_mid, threshold_high, texel.a));
|
||||
texel.rgb = mix(texel.rgb, vec3 (0.0, 0.0, 0.0), 1.0 - smoothstep(0.0, threshold_low, texel.a));
|
||||
|
|
Loading…
Add table
Reference in a new issue