More ALS filter work
This commit is contained in:
parent
14e41b56a4
commit
d3c93a2c64
6 changed files with 98 additions and 6 deletions
|
@ -566,6 +566,16 @@
|
|||
<type>float</type>
|
||||
<value><use>delta_T</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_grey</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_black</use></value>
|
||||
</uniform>
|
||||
|
||||
<!-- sea colors -->
|
||||
<uniform>
|
||||
|
|
|
@ -279,6 +279,16 @@
|
|||
<type>float</type>
|
||||
<value><use>delta_T</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_grey</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_black</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>display_xsize</name>
|
||||
<type>int</type>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PropertyList>
|
||||
<name>Effects/aurora</name>
|
||||
<!-- <inherits-from>Effects/shadow</inherits-from> -->
|
||||
<parameters>
|
||||
<texture n ="0">
|
||||
<type>white</type>
|
||||
|
@ -17,6 +16,16 @@
|
|||
<penetration_factor><use>/environment/aurora/penetration-factor</use></penetration_factor>
|
||||
<patchiness><use>/environment/aurora/patchiness</use></patchiness>
|
||||
<afterglow><use>/environment/aurora/afterglow</use></afterglow>
|
||||
<use_filtering><use>/sim/rendering/als-filters/use-filtering</use></use_filtering>
|
||||
<gamma><use>/sim/rendering/als-filters/gamma</use></gamma>
|
||||
<brightness><use>/sim/rendering/als-filters/brightness</use></brightness>
|
||||
<delta_T><use>/environment/surface/delta-T-cloud</use></delta_T>
|
||||
<fact_grey><use>/sim/rendering/als-filters/grey-factor</use></fact_grey>
|
||||
<fact_black><use>/sim/rendering/als-filters/black-factor</use></fact_black>
|
||||
<use_night_vision><use>/sim/rendering/als-filters/use-night-vision</use></use_night_vision>
|
||||
<use_IR_vision><use>/sim/rendering/als-filters/use-IR-vision</use></use_IR_vision>
|
||||
<display_xsize><use>/sim/startup/xsize</use></display_xsize>
|
||||
<display_ysize><use>/sim/startup/ysize</use></display_ysize>
|
||||
</parameters>
|
||||
|
||||
|
||||
|
@ -108,6 +117,7 @@
|
|||
<vertex-shader>Shaders/planet-aurora.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/planet-aurora.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/noise.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
|
@ -144,6 +154,56 @@
|
|||
<type>float</type>
|
||||
<value><use>afterglow</use></value>
|
||||
</uniform>
|
||||
<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_filtering</name>
|
||||
<type>bool</type>
|
||||
<value><use>use_filtering</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>delta_T</name>
|
||||
<type>float</type>
|
||||
<value><use>delta_T</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_grey</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_black</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>
|
||||
</pass>
|
||||
</technique>
|
||||
|
||||
|
|
|
@ -228,12 +228,12 @@
|
|||
<name>gamma</name>
|
||||
<type>float</type>
|
||||
<value><use>gamma</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>brightness</name>
|
||||
<type>float</type>
|
||||
<value><use>brightness</use></value>
|
||||
</uniform>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_filtering</name>
|
||||
<type>bool</type>
|
||||
|
|
|
@ -530,6 +530,16 @@
|
|||
<type>float</type>
|
||||
<value><use>delta_T</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_grey</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_grey</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>fact_black</name>
|
||||
<type>float</type>
|
||||
<value><use>fact_black</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos1_x</name>
|
||||
<type>float</type>
|
||||
|
|
|
@ -17,7 +17,7 @@ uniform float afterglow;
|
|||
uniform float osg_SimulationTime;
|
||||
|
||||
float Noise2D(in vec2 coord, in float wavelength);
|
||||
|
||||
vec3 filter_combined (in vec3 color) ;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -68,6 +68,8 @@ float angStrength = smoothstep(0.2, 0.6, view_angle);
|
|||
|
||||
float auroraStrength = vStrength * angStrength * noise_01 * noise_02 * strength * fade_factor;
|
||||
|
||||
vec3 finalColor = vec3 (auroraColor.x, auroraColor.y, auroraColor.z);
|
||||
finalColor.rgb = filter_combined(finalColor.rgb);
|
||||
|
||||
gl_FragColor = vec4 (auroraColor.x, auroraColor.y, auroraColor.z, auroraStrength);
|
||||
gl_FragColor = vec4(finalColor.r, finalColor.g, finalColor.b, auroraStrength);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue