#include "renderer_scene_cull.h"
#include "core/config/project_settings.h"
#include "core/object/worker_thread_pool.h"
#include "core/os/os.h"
#include "rendering_light_culler.h"
#include "rendering_server_constants.h"
#include "rendering_server_default.h"
#include <new>
#if defined(DEBUG_ENABLED) && defined(TOOLS_ENABLED)
#include "scene/main/node.h"
#endif
#ifndef _3D_DISABLED
static float get_halton_value(int p_index, int p_base) { … }
#endif
void RendererSceneCull::tick() { … }
void RendererSceneCull::pre_draw(bool p_will_draw) { … }
RID RendererSceneCull::camera_allocate() { … }
void RendererSceneCull::camera_initialize(RID p_rid) { … }
void RendererSceneCull::camera_set_perspective(RID p_camera, float p_fovy_degrees, float p_z_near, float p_z_far) { … }
void RendererSceneCull::camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far) { … }
void RendererSceneCull::camera_set_frustum(RID p_camera, float p_size, Vector2 p_offset, float p_z_near, float p_z_far) { … }
void RendererSceneCull::camera_set_transform(RID p_camera, const Transform3D &p_transform) { … }
void RendererSceneCull::camera_set_cull_mask(RID p_camera, uint32_t p_layers) { … }
void RendererSceneCull::camera_set_environment(RID p_camera, RID p_env) { … }
void RendererSceneCull::camera_set_camera_attributes(RID p_camera, RID p_attributes) { … }
void RendererSceneCull::camera_set_compositor(RID p_camera, RID p_compositor) { … }
void RendererSceneCull::camera_set_use_vertical_aspect(RID p_camera, bool p_enable) { … }
bool RendererSceneCull::is_camera(RID p_camera) const { … }
RID RendererSceneCull::occluder_allocate() { … }
void RendererSceneCull::occluder_initialize(RID p_rid) { … }
void RendererSceneCull::occluder_set_mesh(RID p_occluder, const PackedVector3Array &p_vertices, const PackedInt32Array &p_indices) { … }
void RendererSceneCull::_instance_pair(Instance *p_A, Instance *p_B) { … }
void RendererSceneCull::_instance_unpair(Instance *p_A, Instance *p_B) { … }
RID RendererSceneCull::scenario_allocate() { … }
void RendererSceneCull::scenario_initialize(RID p_rid) { … }
void RendererSceneCull::scenario_set_environment(RID p_scenario, RID p_environment) { … }
void RendererSceneCull::scenario_set_camera_attributes(RID p_scenario, RID p_camera_attributes) { … }
void RendererSceneCull::scenario_set_compositor(RID p_scenario, RID p_compositor) { … }
void RendererSceneCull::scenario_set_fallback_environment(RID p_scenario, RID p_environment) { … }
void RendererSceneCull::scenario_set_reflection_atlas_size(RID p_scenario, int p_reflection_size, int p_reflection_count) { … }
bool RendererSceneCull::is_scenario(RID p_scenario) const { … }
RID RendererSceneCull::scenario_get_environment(RID p_scenario) { … }
void RendererSceneCull::scenario_remove_viewport_visibility_mask(RID p_scenario, RID p_viewport) { … }
void RendererSceneCull::scenario_add_viewport_visibility_mask(RID p_scenario, RID p_viewport) { … }
void RendererSceneCull::_instance_queue_update(Instance *p_instance, bool p_update_aabb, bool p_update_dependencies) { … }
RID RendererSceneCull::instance_allocate() { … }
void RendererSceneCull::instance_initialize(RID p_rid) { … }
void RendererSceneCull::_instance_update_mesh_instance(Instance *p_instance) { … }
void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) { … }
void RendererSceneCull::instance_set_scenario(RID p_instance, RID p_scenario) { … }
void RendererSceneCull::instance_set_layer_mask(RID p_instance, uint32_t p_mask) { … }
void RendererSceneCull::instance_set_pivot_data(RID p_instance, float p_sorting_offset, bool p_use_aabb_center) { … }
void RendererSceneCull::instance_geometry_set_transparency(RID p_instance, float p_transparency) { … }
void RendererSceneCull::instance_set_transform(RID p_instance, const Transform3D &p_transform) { … }
void RendererSceneCull::instance_set_interpolated(RID p_instance, bool p_interpolated) { … }
void RendererSceneCull::instance_reset_physics_interpolation(RID p_instance) { … }
void RendererSceneCull::instance_attach_object_instance_id(RID p_instance, ObjectID p_id) { … }
void RendererSceneCull::instance_set_blend_shape_weight(RID p_instance, int p_shape, float p_weight) { … }
void RendererSceneCull::instance_set_surface_override_material(RID p_instance, int p_surface, RID p_material) { … }
void RendererSceneCull::instance_set_visible(RID p_instance, bool p_visible) { … }
inline bool is_geometry_instance(RenderingServer::InstanceType p_type) { … }
void RendererSceneCull::instance_set_custom_aabb(RID p_instance, AABB p_aabb) { … }
void RendererSceneCull::instance_attach_skeleton(RID p_instance, RID p_skeleton) { … }
void RendererSceneCull::instance_set_extra_visibility_margin(RID p_instance, real_t p_margin) { … }
void RendererSceneCull::instance_set_ignore_culling(RID p_instance, bool p_enabled) { … }
Vector<ObjectID> RendererSceneCull::instances_cull_aabb(const AABB &p_aabb, RID p_scenario) const { … }
Vector<ObjectID> RendererSceneCull::instances_cull_ray(const Vector3 &p_from, const Vector3 &p_to, RID p_scenario) const { … }
Vector<ObjectID> RendererSceneCull::instances_cull_convex(const Vector<Plane> &p_convex, RID p_scenario) const { … }
void RendererSceneCull::instance_geometry_set_flag(RID p_instance, RS::InstanceFlags p_flags, bool p_enabled) { … }
void RendererSceneCull::instance_geometry_set_cast_shadows_setting(RID p_instance, RS::ShadowCastingSetting p_shadow_casting_setting) { … }
void RendererSceneCull::instance_geometry_set_material_override(RID p_instance, RID p_material) { … }
void RendererSceneCull::instance_geometry_set_material_overlay(RID p_instance, RID p_material) { … }
void RendererSceneCull::instance_geometry_set_visibility_range(RID p_instance, float p_min, float p_max, float p_min_margin, float p_max_margin, RS::VisibilityRangeFadeMode p_fade_mode) { … }
void RendererSceneCull::instance_set_visibility_parent(RID p_instance, RID p_parent_instance) { … }
bool RendererSceneCull::_update_instance_visibility_depth(Instance *p_instance) { … }
void RendererSceneCull::_update_instance_visibility_dependencies(Instance *p_instance) { … }
void RendererSceneCull::instance_geometry_set_lightmap(RID p_instance, RID p_lightmap, const Rect2 &p_lightmap_uv_scale, int p_slice_index) { … }
void RendererSceneCull::instance_geometry_set_lod_bias(RID p_instance, float p_lod_bias) { … }
void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, const StringName &p_parameter, const Variant &p_value) { … }
Variant RendererSceneCull::instance_geometry_get_shader_parameter(RID p_instance, const StringName &p_parameter) const { … }
Variant RendererSceneCull::instance_geometry_get_shader_parameter_default_value(RID p_instance, const StringName &p_parameter) const { … }
void RendererSceneCull::instance_geometry_get_shader_parameter_list(RID p_instance, List<PropertyInfo> *p_parameters) const { … }
void RendererSceneCull::_update_instance(Instance *p_instance) { … }
void RendererSceneCull::_unpair_instance(Instance *p_instance) { … }
void RendererSceneCull::_update_instance_aabb(Instance *p_instance) { … }
void RendererSceneCull::_update_instance_lightmap_captures(Instance *p_instance) { … }
void RendererSceneCull::_light_instance_setup_directional_shadow(int p_shadow_index, Instance *p_instance, const Transform3D p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect) { … }
bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, const Transform3D p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect, RID p_shadow_atlas, Scenario *p_scenario, float p_screen_mesh_lod_threshold, uint32_t p_visible_layers) { … }
void RendererSceneCull::render_camera(const Ref<RenderSceneBuffers> &p_render_buffers, RID p_camera, RID p_scenario, RID p_viewport, Size2 p_viewport_size, uint32_t p_jitter_phase_count, float p_screen_mesh_lod_threshold, RID p_shadow_atlas, Ref<XRInterface> &p_xr_interface, RenderInfo *r_render_info) { … }
void RendererSceneCull::_visibility_cull_threaded(uint32_t p_thread, VisibilityCullData *cull_data) { … }
void RendererSceneCull::_visibility_cull(const VisibilityCullData &cull_data, uint64_t p_from, uint64_t p_to) { … }
template <bool p_fade_check>
int RendererSceneCull::_visibility_range_check(InstanceVisibilityData &r_vis_data, const Vector3 &p_camera_pos, uint64_t p_viewport_mask) { … }
bool RendererSceneCull::_visibility_parent_check(const CullData &p_cull_data, const InstanceData &p_instance_data) { … }
void RendererSceneCull::_scene_cull_threaded(uint32_t p_thread, CullData *cull_data) { … }
void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cull_result, uint64_t p_from, uint64_t p_to) { … }
void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_camera_data, const Ref<RenderSceneBuffers> &p_render_buffers, RID p_environment, RID p_force_camera_attributes, RID p_compositor, uint32_t p_visible_layers, RID p_scenario, RID p_viewport, RID p_shadow_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, bool p_using_shadows, RenderingMethod::RenderInfo *r_render_info) { … }
RID RendererSceneCull::_render_get_environment(RID p_camera, RID p_scenario) { … }
RID RendererSceneCull::_render_get_compositor(RID p_camera, RID p_scenario) { … }
void RendererSceneCull::render_empty_scene(const Ref<RenderSceneBuffers> &p_render_buffers, RID p_scenario, RID p_shadow_atlas) { … }
bool RendererSceneCull::_render_reflection_probe_step(Instance *p_instance, int p_step) { … }
void RendererSceneCull::render_probes() { … }
void RendererSceneCull::render_particle_colliders() { … }
void RendererSceneCull::_update_instance_shader_uniforms_from_material(HashMap<StringName, Instance::InstanceShaderParameter> &isparams, const HashMap<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material) { … }
void RendererSceneCull::_update_dirty_instance(Instance *p_instance) { … }
void RendererSceneCull::update_dirty_instances() { … }
void RendererSceneCull::update() { … }
bool RendererSceneCull::free(RID p_rid) { … }
TypedArray<Image> RendererSceneCull::bake_render_uv2(RID p_base, const TypedArray<RID> &p_material_overrides, const Size2i &p_image_size) { … }
void RendererSceneCull::update_visibility_notifiers() { … }
RendererSceneCull *RendererSceneCull::singleton = …;
void RendererSceneCull::set_scene_render(RendererSceneRender *p_scene_render) { … }
void RendererSceneCull::update_interpolation_tick(bool p_process) { … }
void RendererSceneCull::update_interpolation_frame(bool p_process) { … }
void RendererSceneCull::set_physics_interpolation_enabled(bool p_enabled) { … }
void RendererSceneCull::InterpolationData::notify_free_instance(RID p_rid, Instance &r_instance) { … }
RendererSceneCull::RendererSceneCull() { … }
RendererSceneCull::~RendererSceneCull() { … }