Fix: Mass property particle shader error

This commit is contained in:
MathdudeMan 2025-01-28 20:56:55 -05:00
parent a013481b09
commit 964cd6525e
4 changed files with 4 additions and 4 deletions

View File

@ -342,7 +342,7 @@ void main() {
mediump float attractor_attenuation = attractors[i].attenuation;
amount = pow(amount, attractor_attenuation);
dir = safe_normalize(mix(dir, attractors[i].transform[2].xyz, attractors[i].directionality));
attractor_force -= amount * dir * attractors[i].strength;
attractor_force -= mass * amount * dir * attractors[i].strength;
}
float particle_size = particle_size;

View File

@ -1392,7 +1392,7 @@ MaterialStorage::MaterialStorage() {
actions.renames["COLOR"] = "out_color";
actions.renames["VELOCITY"] = "out_velocity_flags.xyz";
//actions.renames["MASS"] = "mass"; ?
actions.renames["MASS"] = "mass";
actions.renames["ACTIVE"] = "particle_active";
actions.renames["RESTART"] = "restart";
actions.renames["CUSTOM"] = "out_custom";

View File

@ -488,7 +488,7 @@ void main() {
}
amount = pow(amount, FRAME.attractors[i].attenuation);
dir = safe_normalize(mix(dir, FRAME.attractors[i].transform[2].xyz, FRAME.attractors[i].directionality));
attractor_force -= amount * dir * FRAME.attractors[i].strength;
attractor_force -= mass * amount * dir * FRAME.attractors[i].strength;
}
float particle_size = FRAME.particle_size;

View File

@ -68,7 +68,7 @@ ParticlesStorage::ParticlesStorage() {
actions.renames["COLOR"] = "PARTICLE.color";
actions.renames["VELOCITY"] = "PARTICLE.velocity";
//actions.renames["MASS"] = "mass"; ?
actions.renames["MASS"] = "mass";
actions.renames["ACTIVE"] = "particle_active";
actions.renames["RESTART"] = "restart";
actions.renames["CUSTOM"] = "PARTICLE.custom";