Atmospheric Light Scattering shader bugfixes
This commit is contained in:
parent
2acdb6dd23
commit
4d10e77226
2 changed files with 6 additions and 19 deletions
|
@ -20,7 +20,7 @@ uniform sampler2D mix_texture;
|
|||
//varying float yprime_alt;
|
||||
//varying float mie_angle;
|
||||
varying float steepness;
|
||||
|
||||
|
||||
|
||||
uniform float visibility;
|
||||
uniform float avisibility;
|
||||
|
@ -37,10 +37,6 @@ uniform float wetness;
|
|||
uniform float fogstructure;
|
||||
uniform float snow_thickness_factor;
|
||||
uniform float cloud_self_shading;
|
||||
uniform float ylimit;
|
||||
uniform float zlimit1;
|
||||
uniform float zlimit2;
|
||||
uniform float xslope;
|
||||
uniform int quality_level;
|
||||
uniform int tquality_level;
|
||||
|
||||
|
@ -144,18 +140,9 @@ else
|
|||
void main()
|
||||
{
|
||||
|
||||
// drop fragments behind the mask of the instrument panel as passed by properties
|
||||
|
||||
|
||||
int xoffset = int(xslope * (ylimit - gl_FragCoord.y));
|
||||
|
||||
|
||||
if ((gl_FragCoord.y < ylimit) && (gl_FragCoord.x > zlimit1 - xoffset) && (gl_FragCoord.x < zlimit2 + xoffset))
|
||||
{discard;}
|
||||
|
||||
|
||||
yprime_alt = diffuse_term.a;
|
||||
diffuse_term.a = 1.0;
|
||||
//diffuse_term.a = 1.0;
|
||||
mie_angle = gl_Color.a;
|
||||
float effective_scattering = min(scattering, cloud_self_shading);
|
||||
|
||||
|
@ -386,7 +373,7 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0))
|
|||
* light_specular.rgb
|
||||
* pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)));
|
||||
}
|
||||
color.a = diffuse_term.a;
|
||||
color.a = 1.0;//diffuse_term.a;
|
||||
// This shouldn't be necessary, but our lighting becomes very
|
||||
// saturated. Clamping the color before modulating by the texture
|
||||
// is closer to what the OpenGL fixed function pipeline does.
|
||||
|
|
|
@ -19,7 +19,7 @@ uniform sampler2D mix_texture;
|
|||
//varying float yprime_alt;
|
||||
//varying float mie_angle;
|
||||
varying float steepness;
|
||||
|
||||
|
||||
|
||||
uniform float visibility;
|
||||
uniform float avisibility;
|
||||
|
@ -141,7 +141,7 @@ void main()
|
|||
|
||||
|
||||
yprime_alt = diffuse_term.a;
|
||||
diffuse_term.a = 1.0;
|
||||
//diffuse_term.a = 1.0;
|
||||
mie_angle = gl_Color.a;
|
||||
float effective_scattering = min(scattering, cloud_self_shading);
|
||||
|
||||
|
@ -366,7 +366,7 @@ if ((dist < 5000.0)&& (quality_level > 3) && (wetness>0.0))
|
|||
* light_specular.rgb
|
||||
* pow(NdotHV, gl_FrontMaterial.shininess + (20.0 * water_factor)));
|
||||
}
|
||||
color.a = diffuse_term.a;
|
||||
color.a = 1.0;//diffuse_term.a;
|
||||
// This shouldn't be necessary, but our lighting becomes very
|
||||
// saturated. Clamping the color before modulating by the texture
|
||||
// is closer to what the OpenGL fixed function pipeline does.
|
||||
|
|
Loading…
Add table
Reference in a new issue