summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/storage_rd
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-15 10:28:44 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-15 10:28:44 +0100
commit5f78f24b081b123f480e00fd0cb1dad590ecd964 (patch)
tree47ab1c946a13557c98f162be0a759efef23b7b9d /servers/rendering/renderer_rd/storage_rd
parent1e9a61cd404c9fbaf55d465268ca665c7acb4828 (diff)
parent9ce57050a5d12776deedd44fcb82dd5841a56686 (diff)
Merge pull request #68426 from clayjohn/GLES3-particles
Add GPUParticles to the OpenGL3 renderer.
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/particles_storage.cpp1
-rw-r--r--servers/rendering/renderer_rd/storage_rd/particles_storage.h12
2 files changed, 5 insertions, 8 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
index 854976692e..51aa81745b 100644
--- a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
@@ -1027,6 +1027,7 @@ void ParticlesStorage::_particles_process(Particles *p_particles, double p_delta
uniforms.push_back(u);
}
p_particles->collision_textures_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, particles_shader.default_shader_rd, 2);
+ p_particles->collision_heightmap_texture = collision_heightmap_texture;
}
}
diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.h b/servers/rendering/renderer_rd/storage_rd/particles_storage.h
index a9cc98abb9..49a8444e2f 100644
--- a/servers/rendering/renderer_rd/storage_rd/particles_storage.h
+++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.h
@@ -54,8 +54,7 @@ private:
float velocity[3];
uint32_t active;
float color[4];
- float custom[3];
- float lifetime;
+ float custom[4];
};
struct ParticlesFrameParams {
@@ -127,9 +126,6 @@ private:
Collider colliders[MAX_COLLIDERS];
};
- struct ParticleEmissionBufferData {
- };
-
struct ParticleEmissionBuffer {
struct Data {
float xform[16];
@@ -412,7 +408,7 @@ public:
bool owns_particles(RID p_rid) { return particles_owner.owns(p_rid); }
virtual RID particles_allocate() override;
- virtual void particles_initialize(RID p_particles_collision) override;
+ virtual void particles_initialize(RID p_rid) override;
virtual void particles_free(RID p_rid) override;
virtual void particles_set_mode(RID p_particles, RS::ParticlesMode p_mode) override;
@@ -519,7 +515,7 @@ public:
virtual void particles_add_collision(RID p_particles, RID p_particles_collision_instance) override;
virtual void particles_remove_collision(RID p_particles, RID p_particles_collision_instance) override;
- virtual void particles_set_canvas_sdf_collision(RID p_particles, bool p_enable, const Transform2D &p_xform, const Rect2 &p_to_screen, RID p_texture) override;
+ void particles_set_canvas_sdf_collision(RID p_particles, bool p_enable, const Transform2D &p_xform, const Rect2 &p_to_screen, RID p_texture);
virtual void update_particles() override;
@@ -546,7 +542,7 @@ public:
virtual AABB particles_collision_get_aabb(RID p_particles_collision) const override;
Vector3 particles_collision_get_extents(RID p_particles_collision) const;
virtual bool particles_collision_is_heightfield(RID p_particles_collision) const override;
- virtual RID particles_collision_get_heightfield_framebuffer(RID p_particles_collision) const override;
+ RID particles_collision_get_heightfield_framebuffer(RID p_particles_collision) const;
Dependency *particles_collision_get_dependency(RID p_particles) const;