Fix transparency sorting
This commit is contained in:
parent
6bf26fb74c
commit
82bb8f1531
4 changed files with 4 additions and 4 deletions
|
@ -1259,7 +1259,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
|
|||
|
||||
_fill_render_list(RENDER_LIST_OPAQUE, p_render_data, PASS_MODE_COLOR, using_sdfgi, using_sdfgi || using_voxelgi);
|
||||
render_list[RENDER_LIST_OPAQUE].sort_by_key();
|
||||
render_list[RENDER_LIST_ALPHA].sort_by_depth();
|
||||
render_list[RENDER_LIST_ALPHA].sort_by_reverse_depth_and_priority();
|
||||
_fill_instance_data(RENDER_LIST_OPAQUE, p_render_data->render_info ? p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_VISIBLE] : (int *)nullptr);
|
||||
_fill_instance_data(RENDER_LIST_ALPHA);
|
||||
|
||||
|
|
|
@ -551,7 +551,7 @@ class RenderForwardClustered : public RendererSceneRenderRD {
|
|||
}
|
||||
};
|
||||
|
||||
void sort_by_reverse_depth_and_priority(bool p_alpha) { //used for alpha
|
||||
void sort_by_reverse_depth_and_priority() { //used for alpha
|
||||
|
||||
SortArray<GeometryInstanceSurfaceDataCache *, SortByReverseDepthAndPriority> sorter;
|
||||
sorter.sort(elements.ptr(), elements.size());
|
||||
|
|
|
@ -374,7 +374,7 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
|
|||
|
||||
_fill_render_list(RENDER_LIST_OPAQUE, p_render_data, PASS_MODE_COLOR);
|
||||
render_list[RENDER_LIST_OPAQUE].sort_by_key();
|
||||
render_list[RENDER_LIST_ALPHA].sort_by_depth();
|
||||
render_list[RENDER_LIST_ALPHA].sort_by_reverse_depth_and_priority();
|
||||
|
||||
// we no longer use this...
|
||||
_fill_instance_data(RENDER_LIST_OPAQUE);
|
||||
|
|
|
@ -356,7 +356,7 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
void sort_by_reverse_depth_and_priority(bool p_alpha) { //used for alpha
|
||||
void sort_by_reverse_depth_and_priority() { //used for alpha
|
||||
|
||||
SortArray<GeometryInstanceSurfaceDataCache *, SortByReverseDepthAndPriority> sorter;
|
||||
sorter.sort(elements.ptr(), elements.size());
|
||||
|
|
Loading…
Reference in a new issue