diff options
author | Bastiaan Olij <mux213@gmail.com> | 2022-09-07 21:23:01 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2022-09-15 12:09:57 +1000 |
commit | 02ea1de7d0c0f9fea5b76bda3d3ca0c498412fea (patch) | |
tree | 6bc355dceae8d4e180062dc67165a626597a9a4e /servers/rendering/renderer_rd/renderer_scene_render_rd.h | |
parent | 20d6672846b3fd1537603ac080116dcc914c10e3 (diff) |
Extract shared scene data into a separate class
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_scene_render_rd.h')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_scene_render_rd.h | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h index d47394989f..b3a355f42f 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h @@ -46,30 +46,14 @@ #include "servers/rendering/renderer_rd/environment/sky.h" #include "servers/rendering/renderer_rd/framebuffer_cache_rd.h" #include "servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.h" +#include "servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.h" #include "servers/rendering/renderer_scene.h" #include "servers/rendering/renderer_scene_render.h" #include "servers/rendering/rendering_device.h" struct RenderDataRD { Ref<RenderSceneBuffersRD> render_buffers; - - Transform3D cam_transform; - Projection cam_projection; - Vector2 taa_jitter; - bool cam_orthogonal = false; - - // For stereo rendering - uint32_t view_count = 1; - Vector3 view_eye_offset[RendererSceneRender::MAX_RENDER_VIEWS]; - Projection view_projection[RendererSceneRender::MAX_RENDER_VIEWS]; - - Transform3D prev_cam_transform; - Projection prev_cam_projection; - Vector2 prev_taa_jitter; - Projection prev_view_projection[RendererSceneRender::MAX_RENDER_VIEWS]; - - float z_near = 0.0; - float z_far = 0.0; + RenderSceneDataRD *scene_data; const PagedArray<RenderGeometryInstance *> *instances = nullptr; const PagedArray<RID> *lights = nullptr; @@ -85,10 +69,6 @@ struct RenderDataRD { RID reflection_probe; int reflection_probe_pass = 0; - float lod_distance_multiplier = 0.0; - Plane lod_camera_plane; - float screen_mesh_lod_threshold = 0.0; - RID cluster_buffer; uint32_t cluster_size = 0; uint32_t cluster_max_elements = 0; @@ -598,13 +578,6 @@ private: uint64_t scene_pass = 0; uint64_t shadow_atlas_realloc_tolerance_msec = 500; - /* !BAS! is this used anywhere? - struct SDFGICosineNeighbour { - uint32_t neighbour; - float weight; - }; - */ - uint32_t max_cluster_elements = 512; void _render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<RenderGeometryInstance *> &p_instances, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0, float p_screen_mesh_lod_threshold = 0.0, bool p_open_pass = true, bool p_close_pass = true, bool p_clear_region = true, RendererScene::RenderInfo *p_render_info = nullptr); @@ -627,6 +600,10 @@ public: RendererRD::GI *get_gi() { return &gi; } + /* SKY */ + + RendererRD::SkyRD *get_sky() { return &sky; } + /* SHADOW ATLAS API */ virtual RID shadow_atlas_create() override; |