From 4f73d3beb44ff63e7dff9ff272ecc548a7185bc1 Mon Sep 17 00:00:00 2001 From: reduz Date: Mon, 14 Feb 2022 13:27:10 +0100 Subject: Add Particle Shader Userdata * Adds optional vec4 USERDATA1 .. USERDATA6 to particles, allowing to store custom data. * This data is allocated on demand, so shaders that do not use it do not cost more. --- drivers/gles3/rasterizer_storage_gles3.cpp | 3 +++ drivers/gles3/rasterizer_storage_gles3.h | 1 + 2 files changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index fda208b812..a7638b49ec 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -2660,6 +2660,9 @@ void RasterizerStorageGLES3::particles_set_use_local_coordinates(RID p_particles void RasterizerStorageGLES3::particles_set_process_material(RID p_particles, RID p_material) { } +RID RasterizerStorageGLES3::particles_get_process_material(RID p_particles) const { + return RID(); +} void RasterizerStorageGLES3::particles_set_fixed_fps(RID p_particles, int p_fps) { } diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h index 0dfc909777..b6a5c0e73e 100644 --- a/drivers/gles3/rasterizer_storage_gles3.h +++ b/drivers/gles3/rasterizer_storage_gles3.h @@ -1050,6 +1050,7 @@ public: void particles_set_speed_scale(RID p_particles, double p_scale) override; void particles_set_use_local_coordinates(RID p_particles, bool p_enable) override; void particles_set_process_material(RID p_particles, RID p_material) override; + RID particles_get_process_material(RID p_particles) const override; void particles_set_fixed_fps(RID p_particles, int p_fps) override; void particles_set_interpolate(RID p_particles, bool p_enable) override; void particles_set_fractional_delta(RID p_particles, bool p_enable) override; -- cgit v1.2.3