CTS-110 Remove soft alpha in deferred pipeline (breaks some content). Will revisit soft alpha in materials project.
parent
39a08368bb
commit
16bbd7bf08
|
|
@ -24,8 +24,6 @@ varying vec3 vary_fragcoord;
|
|||
varying vec3 vary_position;
|
||||
varying vec3 vary_light;
|
||||
|
||||
uniform float alpha_soften;
|
||||
|
||||
uniform mat4 inv_proj;
|
||||
|
||||
vec4 getPosition(vec2 pos_screen)
|
||||
|
|
@ -57,15 +55,6 @@ void main()
|
|||
|
||||
color.rgb = scaleSoftClip(color.rgb);
|
||||
|
||||
if (samp_pos.z != 0.0 && gl_Color.a < 1.0)
|
||||
{
|
||||
float dist_factor = alpha_soften;
|
||||
float a = gl_Color.a;
|
||||
a *= a;
|
||||
dist_factor *= 1.0/(1.0-a);
|
||||
color.a *= min((pos.z-samp_pos.z)*dist_factor, 1.0);
|
||||
}
|
||||
|
||||
//gl_FragColor = gl_Color;
|
||||
gl_FragColor = color;
|
||||
//gl_FragColor = vec4(1,0,1,1);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ varying vec4 vary_position;
|
|||
varying vec3 vary_normal;
|
||||
varying vec3 vary_fragcoord;
|
||||
|
||||
uniform float alpha_soften;
|
||||
|
||||
uniform mat4 inv_proj;
|
||||
|
||||
vec4 getPosition(vec2 pos_screen)
|
||||
|
|
@ -56,15 +54,6 @@ void main()
|
|||
|
||||
color.rgb = fullbrightScaleSoftClip(color.rgb);
|
||||
|
||||
if (samp_pos.z != 0.0 && color.a < 1.0)
|
||||
{
|
||||
float dist_factor = alpha_soften;
|
||||
float a = color.a;
|
||||
a *= a;
|
||||
dist_factor *= 1.0/(1.0-a);
|
||||
color.a *= min((pos.z-samp_pos.z)*dist_factor, 1.0);
|
||||
}
|
||||
|
||||
//gl_FragColor = gl_Color;
|
||||
gl_FragColor = color;
|
||||
//gl_FragColor = vec4(1,0,1,1);
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ varying vec3 vary_fragcoord;
|
|||
varying vec3 vary_position;
|
||||
varying vec3 vary_light;
|
||||
|
||||
uniform float alpha_soften;
|
||||
|
||||
uniform float shadow_bias;
|
||||
|
||||
uniform mat4 inv_proj;
|
||||
|
|
@ -115,15 +113,6 @@ void main()
|
|||
|
||||
color.rgb = scaleSoftClip(color.rgb);
|
||||
|
||||
if (samp_pos.z != 0.0 && gl_Color.a < 1.0)
|
||||
{
|
||||
float dist_factor = alpha_soften;
|
||||
float a = gl_Color.a;
|
||||
a *= a;
|
||||
dist_factor *= 1.0/(1.0-a);
|
||||
color.a *= min((pos.z-samp_pos.z)*dist_factor, 1.0);
|
||||
}
|
||||
|
||||
//gl_FragColor = gl_Color;
|
||||
gl_FragColor = color;
|
||||
//gl_FragColor = vec4(1,0,1,1)*shadow;
|
||||
|
|
|
|||
|
|
@ -6173,7 +6173,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
|
|||
|
||||
shader.uniform2f("screen_res", mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
|
||||
shader.uniform1f("near_clip", LLViewerCamera::getInstance()->getNear()*2.f);
|
||||
shader.uniform1f("alpha_soften", gSavedSettings.getF32("RenderDeferredAlphaSoften"));
|
||||
shader.uniform1f ("shadow_offset", gSavedSettings.getF32("RenderShadowOffset"));
|
||||
shader.uniform1f("shadow_bias", gSavedSettings.getF32("RenderShadowBias"));
|
||||
shader.uniform1f("lum_scale", gSavedSettings.getF32("RenderLuminanceScale"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue