mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix inefficient upload in Mobile Shadows
Clustered performs the following shadow rendering steps 1. Process objects [0; 10) for cascade 0. 2. Process objects [10; 30) for cascade 1. 3. Process objects [30; 100) for cascade 2. 4. Upload objects [0; 100) to GPU. 5. Draw all cascades. Mobile was supposed to be doing the same, but instead was doing: 1. Process objects [0; 10) for cascade 0. 2. Upload objects [0; 10) to GPU. 3. Process objects [10; 30) for cascade 1. 4. Upload objects [0; 30) to GPU. 5. Process objects [30; 100) for cascade 2. 6. Upload objects [0; 100) to GPU. 7. Draw all cascades. That is, always reuploaded everything from scratch. Therefore it pointlessly (and with geometric growth) wasted BW.
This commit is contained in:
parent
134da37497
commit
e605ad93c7
1 changed files with 1 additions and 0 deletions
|
|
@ -1426,6 +1426,7 @@ void RenderForwardMobile::_render_shadow_begin() {
|
|||
_update_render_base_uniform_set();
|
||||
|
||||
render_list[RENDER_LIST_SECONDARY].clear();
|
||||
scene_state.instance_data[RENDER_LIST_SECONDARY].clear();
|
||||
}
|
||||
|
||||
void RenderForwardMobile::_render_shadow_append(RID p_framebuffer, const PagedArray<RenderGeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, float p_lod_distance_multiplier, float p_screen_mesh_lod_threshold, const Rect2i &p_rect, bool p_flip_y, bool p_clear_region, bool p_begin, bool p_end, RenderingMethod::RenderInfo *p_render_info, const Transform3D &p_main_cam_transform) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue