Back out unintended shader changes from SL-10000 fix.
parent
fb335cc243
commit
a67cf385d7
|
|
@ -88,7 +88,7 @@ vec3 linear_to_srgb(vec3 cl);
|
|||
vec2 encode_normal (vec3 n);
|
||||
vec3 decode_normal (vec2 enc);
|
||||
|
||||
vec3 scaleSoftClipFrag(vec3 l);
|
||||
vec3 scaleFragSoftClip(vec3 l);
|
||||
vec3 atmosFragAmbient(vec3 light, vec3 sunlit);
|
||||
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten);
|
||||
vec3 atmosFragAffectDirectionalLight(float light, vec3 sunlit);
|
||||
|
|
@ -312,7 +312,7 @@ void main()
|
|||
//color.rgb = mix(diff.rgb, color.rgb, final_alpha);
|
||||
|
||||
color.rgb = atmosFragLighting(color.rgb, additive, atten);
|
||||
color.rgb = scaleSoftClipFrag(color.rgb);
|
||||
color.rgb = scaleFragSoftClip(color.rgb);
|
||||
|
||||
vec4 light = vec4(0,0,0,0);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ vec3 linear_to_srgb(vec3 cl);
|
|||
|
||||
vec3 atmosFragAmbient(vec3 l, vec3 ambient);
|
||||
vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten);
|
||||
vec3 scaleSoftClipFrag(vec3 l);
|
||||
vec3 scaleFragSoftClip(vec3 l);
|
||||
vec3 atmosFragAffectDirectionalLight(float intensity, vec3 sunlit);
|
||||
void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten);
|
||||
|
||||
|
|
@ -455,7 +455,7 @@ void main()
|
|||
//col = mix(scaleSoftClip(col), fullbrightScaleSoftClip(col), diffuse.a);
|
||||
|
||||
col = atmosFragLighting(col, additive, atten);
|
||||
col = scaleSoftClipFrag(col);
|
||||
col = scaleFragSoftClip(col);
|
||||
|
||||
//convert to linear space before adding local lights
|
||||
col = srgb_to_linear(col);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ vec3 getAtmosAttenuation();
|
|||
|
||||
uniform int no_atmo;
|
||||
|
||||
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
|
||||
vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) {
|
||||
if (no_atmo == 0)
|
||||
{
|
||||
light *= atten.r;
|
||||
|
|
@ -41,32 +41,32 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
|
|||
return light;
|
||||
}
|
||||
|
||||
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
|
||||
vec3 fullbrightFragAtmosTransport(vec3 light, vec3 atten, vec3 additive) {
|
||||
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);
|
||||
return mix(atmosFragTransport(light.rgb, atten, additive), light.rgb + additive.rgb, brightness * brightness);
|
||||
}
|
||||
|
||||
vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) {
|
||||
vec3 fullbrightFragShinyAtmosTransport(vec3 light, vec3 atten, vec3 additive) {
|
||||
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);
|
||||
return mix(atmosFragTransport(light.rgb, atten, additive), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness);
|
||||
}
|
||||
|
||||
vec3 atmosTransport(vec3 light) {
|
||||
return (no_atmo == 1) ? light : atmosTransportFrag(light, getAtmosAttenuation(), getAdditiveColor());
|
||||
return (no_atmo == 1) ? light : atmosFragTransport(light, getAtmosAttenuation(), getAdditiveColor());
|
||||
}
|
||||
|
||||
vec3 fullbrightAtmosTransport(vec3 light) {
|
||||
return (no_atmo == 1) ? light : fullbrightAtmosTransportFrag(light, getAtmosAttenuation(), getAdditiveColor());
|
||||
return (no_atmo == 1) ? light : fullbrightFragAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
|
||||
}
|
||||
|
||||
vec3 fullbrightShinyAtmosTransport(vec3 light) {
|
||||
return (no_atmo == 1) ? light : fullbrightShinyAtmosTransportFrag(light, getAtmosAttenuation(), getAdditiveColor());
|
||||
return (no_atmo == 1) ? light : fullbrightFragShinyAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue