Fixed particle effect UB

This commit is contained in:
Joshua Barretto 2023-05-19 14:46:22 +01:00
parent c73848b932
commit 4961ca2f6d

View File

@ -680,11 +680,11 @@ void main() {
break;
case PORTAL_FIZZ:
attr = Attr(
inst_dir * pow(percent(), 2) + vec3(0, 0, lower * -0.5) + vec3(
inst_dir * (0.3 + pow(percent(), 5)) + vec3(
sin(lifetime * 1.25 + rand0 * 10) + sin(lifetime * 1.3 + rand3 * 10),
sin(lifetime * 1.2 + rand1 * 10) + sin(lifetime * 1.4 + rand4 * 10),
sin(lifetime * 5 + rand2)
) * 0.1,
) * 0.03,
vec3(pow(1.0 - abs(percent() - 0.5) * 2.0, 0.2)),
vec4(vec3(1.8, 0.4, 5.0 + rand6), 1),
spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5)