You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
2D GPU Particles working..
This commit is contained in:
@@ -612,6 +612,7 @@ public:
|
||||
TYPE_POLYGON,
|
||||
TYPE_MESH,
|
||||
TYPE_MULTIMESH,
|
||||
TYPE_PARTICLES,
|
||||
TYPE_CIRCLE,
|
||||
TYPE_TRANSFORM,
|
||||
TYPE_CLIP_IGNORE,
|
||||
@@ -707,6 +708,16 @@ public:
|
||||
CommandMultiMesh() { type = TYPE_MULTIMESH; }
|
||||
};
|
||||
|
||||
struct CommandParticles : public Command {
|
||||
|
||||
RID particles;
|
||||
RID texture;
|
||||
RID normal_map;
|
||||
int h_frames;
|
||||
int v_frames;
|
||||
CommandParticles() { type = TYPE_PARTICLES; }
|
||||
};
|
||||
|
||||
struct CommandCircle : public Command {
|
||||
|
||||
Point2 pos;
|
||||
@@ -844,6 +855,15 @@ public:
|
||||
|
||||
r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
|
||||
|
||||
} break;
|
||||
case Item::Command::TYPE_PARTICLES: {
|
||||
|
||||
const Item::CommandParticles *particles_cmd = static_cast<const Item::CommandParticles *>(c);
|
||||
if (particles_cmd->particles.is_valid()) {
|
||||
Rect3 aabb = RasterizerStorage::base_singleton->particles_get_aabb(particles_cmd->particles);
|
||||
r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
|
||||
}
|
||||
|
||||
} break;
|
||||
case Item::Command::TYPE_CIRCLE: {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user