Merge pull request #93960 from BastiaanOlij/fix_mobile_compositor

Pre transparent compositor effects needs to run later
This commit is contained in:
Rémi Verschelde 2024-07-11 00:27:06 +02:00
commit 46e8377a5e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 5 deletions

View File

@ -1018,11 +1018,6 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
RD::get_singleton()->draw_command_end_label(); // Draw Sky
}
// rendering effects
if (ce_has_pre_transparent) {
_process_compositor_effects(RS::COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT, p_render_data);
}
if (merge_transparent_pass) {
if (render_list[RENDER_LIST_ALPHA].element_info.size() > 0) {
// transparent pass
@ -1058,6 +1053,11 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
RD::get_singleton()->draw_command_end_label(); // Render 3D Pass / Render Reflection Probe Pass
// rendering effects
if (ce_has_pre_transparent) {
_process_compositor_effects(RS::COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT, p_render_data);
}
if (scene_state.used_screen_texture) {
// Copy screen texture to backbuffer so we can read from it
_render_buffers_copy_screen_texture(p_render_data);