Fix: Mass property particle shader error
This commit is contained in:
parent
a013481b09
commit
964cd6525e
4 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue