summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-08 09:33:19 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-08 09:33:19 +0100
commitc6d6c01211d0a4777c75164da4dc96b79229324d (patch)
tree4c316dbdbf72165709e9ab43426030bf9d02ffa3
parentb53c4dda62373a4c88b894f3c298766853452689 (diff)
parent76caf3fbaea0641bccaf26542aa2700308e4182f (diff)
Merge pull request #72853 from clayjohn/GL-particles-color
Set instancing flags when using GPUParticles in OpenGL renderer
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index 7f67651e62..0e217f699e 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -1142,6 +1142,8 @@ void RasterizerCanvasGLES3::_record_item_commands(const Item *p_item, RID p_rend
RID particles = pt->particles;
state.canvas_instance_batches[state.current_batch_index].tex = pt->texture;
state.canvas_instance_batches[state.current_batch_index].shader_variant = CanvasShaderGLES3::MODE_INSTANCED;
+ state.instance_data_array[r_index].flags |= FLAGS_INSTANCING_HAS_COLORS;
+ state.instance_data_array[r_index].flags |= FLAGS_INSTANCING_HAS_CUSTOM_DATA;
if (particles_storage->particles_has_collision(particles) && texture_storage->render_target_is_sdf_enabled(p_render_target)) {
// Pass collision information.