Prepare rock and base terrain effect for ALS filtering
This commit is contained in:
parent
6a423160dd
commit
31c2312732
4 changed files with 81 additions and 0 deletions
|
@ -93,6 +93,7 @@
|
||||||
<fragment-shader>Shaders/noise.frag</fragment-shader>
|
<fragment-shader>Shaders/noise.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/hazes.frag</fragment-shader>
|
<fragment-shader>Shaders/hazes.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
|
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>intrinsic_wetness</name>
|
<name>intrinsic_wetness</name>
|
||||||
|
@ -294,6 +295,38 @@
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
<value><use>landing_light3_offset</use></value>
|
<value><use>landing_light3_offset</use></value>
|
||||||
</uniform>
|
</uniform>
|
||||||
|
<!-- filtering -->
|
||||||
|
<uniform>
|
||||||
|
<name>gamma</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value><use>gamma</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>brightness</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value><use>brightness</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>use_night_vision</name>
|
||||||
|
<type>bool</type>
|
||||||
|
<value><use>use_night_vision</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>use_IR_vision</name>
|
||||||
|
<type>bool</type>
|
||||||
|
<value><use>use_IR_vision</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>use_filtering</name>
|
||||||
|
<type>bool</type>
|
||||||
|
<value><use>use_filtering</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>delta_T</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value><use>delta_T</use></value>
|
||||||
|
</uniform>
|
||||||
|
<!-- cloud shadows -->
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>cloudpos1_x</name>
|
<name>cloudpos1_x</name>
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
|
|
|
@ -1198,6 +1198,8 @@
|
||||||
<vertex-shader>Shaders/generic-ALS-base.vert</vertex-shader>
|
<vertex-shader>Shaders/generic-ALS-base.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/terrain-ALS-base.frag</fragment-shader>
|
<fragment-shader>Shaders/terrain-ALS-base.frag</fragment-shader>
|
||||||
<fragment-shader>Shaders/hazes.frag</fragment-shader>
|
<fragment-shader>Shaders/hazes.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/noise.frag</fragment-shader>
|
||||||
|
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>visibility</name>
|
<name>visibility</name>
|
||||||
|
@ -1258,6 +1260,47 @@
|
||||||
<name>air_pollution</name>
|
<name>air_pollution</name>
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
<value><use>air_pollution</use></value>
|
<value><use>air_pollution</use></value>
|
||||||
|
</uniform>
|
||||||
|
<!-- filtering -->
|
||||||
|
<uniform>
|
||||||
|
<name>gamma</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value><use>gamma</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>brightness</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value><use>brightness</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>use_night_vision</name>
|
||||||
|
<type>bool</type>
|
||||||
|
<value><use>use_night_vision</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>use_IR_vision</name>
|
||||||
|
<type>bool</type>
|
||||||
|
<value><use>use_IR_vision</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>use_filtering</name>
|
||||||
|
<type>bool</type>
|
||||||
|
<value><use>use_filtering</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>delta_T</name>
|
||||||
|
<type>float</type>
|
||||||
|
<value><use>delta_T</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>display_xsize</name>
|
||||||
|
<type>int</type>
|
||||||
|
<value><use>display_xsize</use></value>
|
||||||
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>display_ysize</name>
|
||||||
|
<type>int</type>
|
||||||
|
<value><use>display_ysize</use></value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>texture</name>
|
<name>texture</name>
|
||||||
|
|
|
@ -81,6 +81,7 @@ vec3 rayleigh_out_shift(in vec3 color, in float outscatter);
|
||||||
vec3 get_hazeColor(in float light_arg);
|
vec3 get_hazeColor(in float light_arg);
|
||||||
vec3 searchlight();
|
vec3 searchlight();
|
||||||
vec3 landing_light(in float offset, in float offsetv);
|
vec3 landing_light(in float offset, in float offsetv);
|
||||||
|
vec3 filter_combined (in vec3 color) ;
|
||||||
|
|
||||||
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
|
||||||
{
|
{
|
||||||
|
@ -665,6 +666,8 @@ fragColor.rgb = mix(hazeColor + secondary_light * fog_backscatter(mvisibility),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||||
|
|
||||||
gl_FragColor = fragColor;
|
gl_FragColor = fragColor;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ float eShade;
|
||||||
|
|
||||||
float fog_func (in float targ, in float alt);
|
float fog_func (in float targ, in float alt);
|
||||||
vec3 get_hazeColor(in float light_arg);
|
vec3 get_hazeColor(in float light_arg);
|
||||||
|
vec3 filter_combined (in vec3 color) ;
|
||||||
|
|
||||||
float luminance(vec3 color)
|
float luminance(vec3 color)
|
||||||
{
|
{
|
||||||
|
@ -236,6 +237,7 @@ hazeColor.rgb = max(hazeColor.rgb, minLight.rgb);
|
||||||
fragColor.rgb = mix(hazeColor, fragColor.rgb,transmission);
|
fragColor.rgb = mix(hazeColor, fragColor.rgb,transmission);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragColor.rgb = filter_combined(fragColor.rgb);
|
||||||
|
|
||||||
gl_FragColor = fragColor;
|
gl_FragColor = fragColor;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue