contrails: raise alpha floor after rough shader

This commit is contained in:
Richard Zink committed 2026-10-12 20:23:29 +02:00
1 parent 7e603d7677
commit b76b4fe4f2
1 file changed
+5 -5
+5 -5
View File
@@ -5475,11 +5475,11 @@ var CT2_FRAG_SRC = [
'float edge = 1.0 - smoothstep(wob * 0.10, wob, raggedSide);', 'float edge = 1.0 - smoothstep(wob * 0.10, wob, raggedSide);',
'edge *= 0.32 + 0.68 * pow(vU, 0.55);', 'edge *= 0.32 + 0.68 * pow(vU, 0.55);',
'float dens = fbm2(vec2(vU * 31.0 + vV * 2.0, vU * 7.0 - vV * 4.0));', 'float dens = fbm2(vec2(vU * 31.0 + vV * 2.0, vU * 7.0 - vV * 4.0));',
'dens = smoothstep(0.24, 0.86, dens);', 'dens = 0.35 + 0.75 * smoothstep(0.12, 0.78, dens);',
'float streak = 0.55 + 0.45 * noise2(vec2(vU * 90.0, vV * 2.0));', 'float streak = 0.65 + 0.35 * noise2(vec2(vU * 90.0, vV * 2.0));',
'float head = 0.28 + 0.72 * vU;', 'float head = 0.32 + 0.68 * vU;',
'float a = clamp(vS * edge * head * dens * streak, 0.0, 0.92);', 'float a = clamp(vS * (0.25 + edge * head * dens * streak), 0.0, 0.95);',
'if (a <= 0.006) discard;', 'if (a <= 0.002) discard;',
'vec3 dayCol = mix(vec3(0.82, 0.84, 0.88), vec3(1.0, 1.0, 1.0), dens);', 'vec3 dayCol = mix(vec3(0.82, 0.84, 0.88), vec3(1.0, 1.0, 1.0), dens);',
'vec3 nightCol = mix(vec3(0.30, 0.38, 0.55), vec3(0.58, 0.68, 0.88), dens);', 'vec3 nightCol = mix(vec3(0.30, 0.38, 0.55), vec3(0.58, 0.68, 0.88), dens);',
'vec3 col = mix(nightCol, dayCol, clamp(uDay, 0.0, 1.0));', 'vec3 col = mix(nightCol, dayCol, clamp(uDay, 0.0, 1.0));',