diff options
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/rasterizer_dummy.h | 16 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/renderer_storage_rd.cpp | 16 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/renderer_storage_rd.h | 42 | ||||
-rw-r--r-- | servers/rendering/renderer_storage.h | 16 | ||||
-rw-r--r-- | servers/rendering/rendering_server_default.h | 8 |
5 files changed, 49 insertions, 49 deletions
diff --git a/servers/rendering/rasterizer_dummy.h b/servers/rendering/rasterizer_dummy.h index b2fffca3ea..f58d124140 100644 --- a/servers/rendering/rasterizer_dummy.h +++ b/servers/rendering/rasterizer_dummy.h @@ -543,8 +543,8 @@ public: void particles_set_lifetime(RID p_particles, double p_lifetime) override {} void particles_set_one_shot(RID p_particles, bool p_one_shot) override {} void particles_set_pre_process_time(RID p_particles, double p_time) override {} - void particles_set_explosiveness_ratio(RID p_particles, float p_ratio) override {} - void particles_set_randomness_ratio(RID p_particles, float p_ratio) override {} + void particles_set_explosiveness_ratio(RID p_particles, real_t p_ratio) override {} + void particles_set_randomness_ratio(RID p_particles, real_t p_ratio) override {} void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) override {} 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 {} @@ -554,11 +554,11 @@ public: void particles_set_fractional_delta(RID p_particles, bool p_enable) override {} void particles_set_subemitter(RID p_particles, RID p_subemitter_particles) override {} void particles_set_view_axis(RID p_particles, const Vector3 &p_axis, const Vector3 &p_up_axis) override {} - void particles_set_collision_base_size(RID p_particles, float p_size) override {} + void particles_set_collision_base_size(RID p_particles, real_t p_size) override {} void particles_set_transform_align(RID p_particles, RS::ParticlesTransformAlign p_transform_align) override {} - void particles_set_trails(RID p_particles, bool p_enable, float p_length) override {} + void particles_set_trails(RID p_particles, bool p_enable, double p_length) override {} void particles_set_trail_bind_poses(RID p_particles, const Vector<Transform3D> &p_bind_poses) override {} void particles_restart(RID p_particles) override {} @@ -591,11 +591,11 @@ public: void particles_collision_initialize(RID p_rid) override {} void particles_collision_set_collision_type(RID p_particles_collision, RS::ParticlesCollisionType p_type) override {} void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask) override {} - void particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius) override {} + void particles_collision_set_sphere_radius(RID p_particles_collision, real_t p_radius) override {} void particles_collision_set_box_extents(RID p_particles_collision, const Vector3 &p_extents) override {} - void particles_collision_set_attractor_strength(RID p_particles_collision, float p_strength) override {} - void particles_collision_set_attractor_directionality(RID p_particles_collision, float p_directionality) override {} - void particles_collision_set_attractor_attenuation(RID p_particles_collision, float p_curve) override {} + void particles_collision_set_attractor_strength(RID p_particles_collision, real_t p_strength) override {} + void particles_collision_set_attractor_directionality(RID p_particles_collision, real_t p_directionality) override {} + void particles_collision_set_attractor_attenuation(RID p_particles_collision, real_t p_curve) override {} void particles_collision_set_field_texture(RID p_particles_collision, RID p_texture) override {} void particles_collision_height_field_update(RID p_particles_collision) override {} void particles_collision_set_height_field_resolution(RID p_particles_collision, RS::ParticlesCollisionHeightfieldResolution p_resolution) override {} diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index 4feaf08808..16a8fecc05 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -4109,12 +4109,12 @@ void RendererStorageRD::particles_set_pre_process_time(RID p_particles, double p ERR_FAIL_COND(!particles); particles->pre_process_time = p_time; } -void RendererStorageRD::particles_set_explosiveness_ratio(RID p_particles, float p_ratio) { +void RendererStorageRD::particles_set_explosiveness_ratio(RID p_particles, real_t p_ratio) { Particles *particles = particles_owner.getornull(p_particles); ERR_FAIL_COND(!particles); particles->explosiveness = p_ratio; } -void RendererStorageRD::particles_set_randomness_ratio(RID p_particles, float p_ratio) { +void RendererStorageRD::particles_set_randomness_ratio(RID p_particles, real_t p_ratio) { Particles *particles = particles_owner.getornull(p_particles); ERR_FAIL_COND(!particles); particles->randomness = p_ratio; @@ -4170,7 +4170,7 @@ void RendererStorageRD::particles_set_fractional_delta(RID p_particles, bool p_e particles->fractional_delta = p_enable; } -void RendererStorageRD::particles_set_trails(RID p_particles, bool p_enable, float p_length) { +void RendererStorageRD::particles_set_trails(RID p_particles, bool p_enable, double p_length) { Particles *particles = particles_owner.getornull(p_particles); ERR_FAIL_COND(!particles); ERR_FAIL_COND(p_length < 0.1); @@ -4206,7 +4206,7 @@ void RendererStorageRD::particles_set_trail_bind_poses(RID p_particles, const Ve particles->dependency.changed_notify(DEPENDENCY_CHANGED_PARTICLES); } -void RendererStorageRD::particles_set_collision_base_size(RID p_particles, float p_size) { +void RendererStorageRD::particles_set_collision_base_size(RID p_particles, real_t p_size) { Particles *particles = particles_owner.getornull(p_particles); ERR_FAIL_COND(!particles); @@ -5464,7 +5464,7 @@ void RendererStorageRD::particles_collision_set_cull_mask(RID p_particles_collis particles_collision->cull_mask = p_cull_mask; } -void RendererStorageRD::particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius) { +void RendererStorageRD::particles_collision_set_sphere_radius(RID p_particles_collision, real_t p_radius) { ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision); ERR_FAIL_COND(!particles_collision); @@ -5480,21 +5480,21 @@ void RendererStorageRD::particles_collision_set_box_extents(RID p_particles_coll particles_collision->dependency.changed_notify(DEPENDENCY_CHANGED_AABB); } -void RendererStorageRD::particles_collision_set_attractor_strength(RID p_particles_collision, float p_strength) { +void RendererStorageRD::particles_collision_set_attractor_strength(RID p_particles_collision, real_t p_strength) { ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision); ERR_FAIL_COND(!particles_collision); particles_collision->attractor_strength = p_strength; } -void RendererStorageRD::particles_collision_set_attractor_directionality(RID p_particles_collision, float p_directionality) { +void RendererStorageRD::particles_collision_set_attractor_directionality(RID p_particles_collision, real_t p_directionality) { ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision); ERR_FAIL_COND(!particles_collision); particles_collision->attractor_directionality = p_directionality; } -void RendererStorageRD::particles_collision_set_attractor_attenuation(RID p_particles_collision, float p_curve) { +void RendererStorageRD::particles_collision_set_attractor_attenuation(RID p_particles_collision, real_t p_curve) { ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision); ERR_FAIL_COND(!particles_collision); diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h index 71c3d8b09a..c048be5dc8 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.h +++ b/servers/rendering/renderer_rd/renderer_storage_rd.h @@ -663,19 +663,19 @@ private: uint32_t type; uint32_t texture_index; //texture index for vector field - float scale; + real_t scale; uint32_t pad[2]; }; uint32_t emitting; - float system_phase; - float prev_system_phase; + double system_phase; + double prev_system_phase; uint32_t cycle; - float explosiveness; - float randomness; - float time; - float delta; + real_t explosiveness; + real_t randomness; + double time; + double delta; uint32_t frame; uint32_t pad0; @@ -721,8 +721,8 @@ private: int amount = 0; double lifetime = 1.0; double pre_process_time = 0.0; - float explosiveness = 0.0; - float randomness = 0.0; + real_t explosiveness = 0.0; + real_t randomness = 0.0; bool restart_request = false; AABB custom_aabb = AABB(Vector3(-4, -4, -4), Vector3(8, 8, 8)); bool use_local_coords = true; @@ -766,8 +766,8 @@ private: RID sub_emitter; - float phase = 0.0; - float prev_phase = 0.0; + double phase = 0.0; + double prev_phase = 0.0; uint64_t prev_ticks = 0; uint32_t random_seed = 0; @@ -779,7 +779,7 @@ private: bool interpolate = true; bool fractional_delta = false; double frame_remainder = 0; - float collision_base_size = 0.01; + real_t collision_base_size = 0.01; bool clear = true; @@ -796,7 +796,7 @@ private: Dependency dependency; - float trail_length = 1.0; + double trail_length = 1.0; bool trails_enabled = false; LocalVector<ParticlesFrameParams> frame_history; LocalVector<ParticlesFrameParams> trail_params; @@ -2147,8 +2147,8 @@ public: void particles_set_lifetime(RID p_particles, double p_lifetime); void particles_set_one_shot(RID p_particles, bool p_one_shot); void particles_set_pre_process_time(RID p_particles, double p_time); - void particles_set_explosiveness_ratio(RID p_particles, float p_ratio); - void particles_set_randomness_ratio(RID p_particles, float p_ratio); + void particles_set_explosiveness_ratio(RID p_particles, real_t p_ratio); + void particles_set_randomness_ratio(RID p_particles, real_t p_ratio); void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb); void particles_set_speed_scale(RID p_particles, double p_scale); void particles_set_use_local_coordinates(RID p_particles, bool p_enable); @@ -2156,10 +2156,10 @@ public: void particles_set_fixed_fps(RID p_particles, int p_fps); void particles_set_interpolate(RID p_particles, bool p_enable); void particles_set_fractional_delta(RID p_particles, bool p_enable); - void particles_set_collision_base_size(RID p_particles, float p_size); + void particles_set_collision_base_size(RID p_particles, real_t p_size); void particles_set_transform_align(RID p_particles, RS::ParticlesTransformAlign p_transform_align); - void particles_set_trails(RID p_particles, bool p_enable, float p_length); + void particles_set_trails(RID p_particles, bool p_enable, double p_length); void particles_set_trail_bind_poses(RID p_particles, const Vector<Transform3D> &p_bind_poses); void particles_restart(RID p_particles); @@ -2252,11 +2252,11 @@ public: virtual void particles_collision_set_collision_type(RID p_particles_collision, RS::ParticlesCollisionType p_type); virtual void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask); - virtual void particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius); //for spheres + virtual void particles_collision_set_sphere_radius(RID p_particles_collision, real_t p_radius); //for spheres virtual void particles_collision_set_box_extents(RID p_particles_collision, const Vector3 &p_extents); //for non-spheres - virtual void particles_collision_set_attractor_strength(RID p_particles_collision, float p_strength); - virtual void particles_collision_set_attractor_directionality(RID p_particles_collision, float p_directionality); - virtual void particles_collision_set_attractor_attenuation(RID p_particles_collision, float p_curve); + virtual void particles_collision_set_attractor_strength(RID p_particles_collision, real_t p_strength); + virtual void particles_collision_set_attractor_directionality(RID p_particles_collision, real_t p_directionality); + virtual void particles_collision_set_attractor_attenuation(RID p_particles_collision, real_t p_curve); virtual void particles_collision_set_field_texture(RID p_particles_collision, RID p_texture); //for SDF and vector field, heightfield is dynamic virtual void particles_collision_height_field_update(RID p_particles_collision); //for SDF and vector field virtual void particles_collision_set_height_field_resolution(RID p_particles_collision, RS::ParticlesCollisionHeightfieldResolution p_resolution); //for SDF and vector field diff --git a/servers/rendering/renderer_storage.h b/servers/rendering/renderer_storage.h index 6ffbdbf685..2304394501 100644 --- a/servers/rendering/renderer_storage.h +++ b/servers/rendering/renderer_storage.h @@ -471,8 +471,8 @@ public: virtual void particles_set_lifetime(RID p_particles, double p_lifetime) = 0; virtual void particles_set_one_shot(RID p_particles, bool p_one_shot) = 0; virtual void particles_set_pre_process_time(RID p_particles, double p_time) = 0; - virtual void particles_set_explosiveness_ratio(RID p_particles, float p_ratio) = 0; - virtual void particles_set_randomness_ratio(RID p_particles, float p_ratio) = 0; + virtual void particles_set_explosiveness_ratio(RID p_particles, real_t p_ratio) = 0; + virtual void particles_set_randomness_ratio(RID p_particles, real_t p_ratio) = 0; virtual void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) = 0; virtual void particles_set_speed_scale(RID p_particles, double p_scale) = 0; virtual void particles_set_use_local_coordinates(RID p_particles, bool p_enable) = 0; @@ -480,11 +480,11 @@ public: virtual void particles_set_fixed_fps(RID p_particles, int p_fps) = 0; virtual void particles_set_interpolate(RID p_particles, bool p_enable) = 0; virtual void particles_set_fractional_delta(RID p_particles, bool p_enable) = 0; - virtual void particles_set_collision_base_size(RID p_particles, float p_size) = 0; + virtual void particles_set_collision_base_size(RID p_particles, real_t p_size) = 0; virtual void particles_set_transform_align(RID p_particles, RS::ParticlesTransformAlign p_transform_align) = 0; - virtual void particles_set_trails(RID p_particles, bool p_enable, float p_length) = 0; + virtual void particles_set_trails(RID p_particles, bool p_enable, double p_length) = 0; virtual void particles_set_trail_bind_poses(RID p_particles, const Vector<Transform3D> &p_bind_poses) = 0; virtual void particles_restart(RID p_particles) = 0; @@ -523,11 +523,11 @@ public: virtual void particles_collision_set_collision_type(RID p_particles_collision, RS::ParticlesCollisionType p_type) = 0; virtual void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask) = 0; - virtual void particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius) = 0; //for spheres + virtual void particles_collision_set_sphere_radius(RID p_particles_collision, real_t p_radius) = 0; //for spheres virtual void particles_collision_set_box_extents(RID p_particles_collision, const Vector3 &p_extents) = 0; //for non-spheres - virtual void particles_collision_set_attractor_strength(RID p_particles_collision, float p_strength) = 0; - virtual void particles_collision_set_attractor_directionality(RID p_particles_collision, float p_directionality) = 0; - virtual void particles_collision_set_attractor_attenuation(RID p_particles_collision, float p_curve) = 0; + virtual void particles_collision_set_attractor_strength(RID p_particles_collision, real_t p_strength) = 0; + virtual void particles_collision_set_attractor_directionality(RID p_particles_collision, real_t p_directionality) = 0; + virtual void particles_collision_set_attractor_attenuation(RID p_particles_collision, real_t p_curve) = 0; virtual void particles_collision_set_field_texture(RID p_particles_collision, RID p_texture) = 0; //for SDF and vector field, heightfield is dynamic virtual void particles_collision_height_field_update(RID p_particles_collision) = 0; //for SDF and vector field virtual void particles_collision_set_height_field_resolution(RID p_particles_collision, RS::ParticlesCollisionHeightfieldResolution p_resolution) = 0; //for SDF and vector field diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h index 381f38d80e..c1336ee42d 100644 --- a/servers/rendering/rendering_server_default.h +++ b/servers/rendering/rendering_server_default.h @@ -478,11 +478,11 @@ public: FUNC2(particles_collision_set_collision_type, RID, ParticlesCollisionType) FUNC2(particles_collision_set_cull_mask, RID, uint32_t) - FUNC2(particles_collision_set_sphere_radius, RID, float) + FUNC2(particles_collision_set_sphere_radius, RID, real_t) FUNC2(particles_collision_set_box_extents, RID, const Vector3 &) - FUNC2(particles_collision_set_attractor_strength, RID, float) - FUNC2(particles_collision_set_attractor_directionality, RID, float) - FUNC2(particles_collision_set_attractor_attenuation, RID, float) + FUNC2(particles_collision_set_attractor_strength, RID, real_t) + FUNC2(particles_collision_set_attractor_directionality, RID, real_t) + FUNC2(particles_collision_set_attractor_attenuation, RID, real_t) FUNC2(particles_collision_set_field_texture, RID, RID) FUNC1(particles_collision_height_field_update, RID) FUNC2(particles_collision_set_height_field_resolution, RID, ParticlesCollisionHeightfieldResolution) |