All paths now use the same atmospheric transport calcs.
meow-7.2.2
Graham Linden 2019-04-19 08:26:03 -07:00
parent ea9c8e4325
commit f30a649f1c
6 changed files with 5 additions and 59 deletions

View File

@ -63,7 +63,7 @@ void main()
float final_alpha = color.a * vertex_color.a;
#ifdef HAS_ALPHA_MASK
if (color.a < minimum_alpha)
if (final_alpha < minimum_alpha)
{
discard;
}

View File

@ -69,7 +69,6 @@ vec4 applyWaterFogView(vec3 pos, vec4 color);
vec3 getNorm(vec2 pos_screen);
vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten);
vec3 fullbrightAtmosTransportFrag(vec3 l, vec3 additive, vec3 atten);
void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten);

View File

@ -31,18 +31,6 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
return light;
}
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
/* stub function for fallback compatibility on class1 hardware */
return light;
}
vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 atten, vec3 additive)
{
/* stub function for fallback compatibility on class1 hardware */
return light;
}
vec3 atmosTransport(vec3 light)
{
/* stub function for fallback compatibility on class1 hardware */

View File

@ -73,8 +73,6 @@ vec3 scaleSoftClipFrag(vec3 l);
void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten);
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec4 getPositionWithDepth(vec2 pos_screen, float depth);
vec4 getPosition(vec2 pos_screen);

View File

@ -43,25 +43,6 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
return light;
}
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
if (no_atmo == 1)
{
return light;
}
float brightness = dot(light.rgb, vec3(0.33333));
return mix(atmosTransportFrag(light.rgb, additive, atten), light.rgb + additive.rgb, brightness * brightness * 0.1);
}
vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
if (no_atmo == 1)
{
return light;
}
float brightness = dot(light.rgb, vec3(0.33333));
return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness * 0.1);
}
vec3 atmosTransport(vec3 light)
{
return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
@ -69,10 +50,10 @@ vec3 atmosTransport(vec3 light)
vec3 fullbrightAtmosTransport(vec3 light)
{
return fullbrightAtmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation());
return atmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation());
}
vec3 fullbrightShinyAtmosTransport(vec3 light)
{
return fullbrightShinyAtmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation());
return atmosTransportFrag(light,getAdditiveColor(), getAtmosAttenuation());
}

View File

@ -41,26 +41,6 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
return (light + additive) * atten * 2.0;
}
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
if (no_atmo == 1)
{
return light;
}
float brightness = dot(light.rgb, vec3(0.33333));
return mix(atmosTransportFrag(light.rgb, additive,atten), light.rgb + additive.rgb, brightness * brightness);
}
vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
if (no_atmo == 1)
{
return light;
}
float brightness = dot(light.rgb, vec3(0.33333));
return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness);
}
vec3 atmosTransport(vec3 light)
{
return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
@ -68,10 +48,10 @@ vec3 atmosTransport(vec3 light)
vec3 fullbrightAtmosTransport(vec3 light)
{
return fullbrightAtmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
}
vec3 fullbrightShinyAtmosTransport(vec3 light)
{
return fullbrightShinyAtmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
}