mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix: Mass property particle shader error
This commit is contained in:
@@ -342,7 +342,7 @@ void main() {
|
|||||||
mediump float attractor_attenuation = attractors[i].attenuation;
|
mediump float attractor_attenuation = attractors[i].attenuation;
|
||||||
amount = pow(amount, attractor_attenuation);
|
amount = pow(amount, attractor_attenuation);
|
||||||
dir = safe_normalize(mix(dir, attractors[i].transform[2].xyz, attractors[i].directionality));
|
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;
|
float particle_size = particle_size;
|
||||||
|
|||||||
@@ -1392,7 +1392,7 @@ MaterialStorage::MaterialStorage() {
|
|||||||
|
|
||||||
actions.renames["COLOR"] = "out_color";
|
actions.renames["COLOR"] = "out_color";
|
||||||
actions.renames["VELOCITY"] = "out_velocity_flags.xyz";
|
actions.renames["VELOCITY"] = "out_velocity_flags.xyz";
|
||||||
//actions.renames["MASS"] = "mass"; ?
|
actions.renames["MASS"] = "mass";
|
||||||
actions.renames["ACTIVE"] = "particle_active";
|
actions.renames["ACTIVE"] = "particle_active";
|
||||||
actions.renames["RESTART"] = "restart";
|
actions.renames["RESTART"] = "restart";
|
||||||
actions.renames["CUSTOM"] = "out_custom";
|
actions.renames["CUSTOM"] = "out_custom";
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
amount = pow(amount, FRAME.attractors[i].attenuation);
|
amount = pow(amount, FRAME.attractors[i].attenuation);
|
||||||
dir = safe_normalize(mix(dir, FRAME.attractors[i].transform[2].xyz, FRAME.attractors[i].directionality));
|
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;
|
float particle_size = FRAME.particle_size;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ ParticlesStorage::ParticlesStorage() {
|
|||||||
|
|
||||||
actions.renames["COLOR"] = "PARTICLE.color";
|
actions.renames["COLOR"] = "PARTICLE.color";
|
||||||
actions.renames["VELOCITY"] = "PARTICLE.velocity";
|
actions.renames["VELOCITY"] = "PARTICLE.velocity";
|
||||||
//actions.renames["MASS"] = "mass"; ?
|
actions.renames["MASS"] = "mass";
|
||||||
actions.renames["ACTIVE"] = "particle_active";
|
actions.renames["ACTIVE"] = "particle_active";
|
||||||
actions.renames["RESTART"] = "restart";
|
actions.renames["RESTART"] = "restart";
|
||||||
actions.renames["CUSTOM"] = "PARTICLE.custom";
|
actions.renames["CUSTOM"] = "PARTICLE.custom";
|
||||||
|
|||||||
Reference in New Issue
Block a user