From 1dfb70de8f4be09d02b4855faf07b3c54749676e Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Wed, 6 Jan 2021 22:34:40 +1030 Subject: [PATCH] Receptors: cheaper alpha mix shadow --- shaders/receptors.shader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders/receptors.shader b/shaders/receptors.shader index 1146061..cb290dd 100644 --- a/shaders/receptors.shader +++ b/shaders/receptors.shader @@ -56,7 +56,7 @@ void fragment() { lds_alpha.yw = dot_alpha(UV); lds_alpha.xz = clamp(line_alpha(dist), vec2(0.0), vec2(1.0-lds_alpha.y)); - lds_alpha.z = pow(max(lds_alpha.z, lds_alpha.w), 1.0-min(lds_alpha.z, lds_alpha.w)); + lds_alpha.z += lds_alpha.w*(1.0-lds_alpha.z); lds_alpha = clamp(lds_alpha, 0.0, 1.0); lds_alpha.z *= 1.0-min(dot(lds_alpha.xy, vec2(1.0)), 1.0); lds_alpha.z = max(pow(lds_alpha.z, 2.0)-0.125, 0.0);