Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix updating lightmap captures on Mobile #99367

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

BlueCube3310
Copy link
Contributor

@BlueCube3310 BlueCube3310 commented Nov 17, 2024

Fixes #84846

"The best solution is usually the easiest one"

The mobile backend would only create the probe buffer, but never update it (unlike Forward)

@BlueCube3310 BlueCube3310 requested a review from a team as a code owner November 17, 2024 18:32
@AThousandShips AThousandShips added this to the 4.4 milestone Nov 17, 2024
@AThousandShips AThousandShips added cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Nov 17, 2024
@SpockBauru
Copy link

Updated my MRP to this PR:
light_probes_mobile.zip

This PR Indeed fixes the issues for the Mobile Renderer, thanks!

Mobile_Probes.mp4

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected.

Comment on lines +2068 to +2070
if (p_render_list == RENDER_LIST_OPAQUE && lightmap_captures_used) {
RD::get_singleton()->buffer_update(scene_state.lightmap_capture_buffer, 0, sizeof(LightmapCaptureData) * lightmap_captures_used, scene_state.lightmap_captures);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that despite this being done in the opaque render list, it works on dynamic objects that have transparent materials too.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

These fixes always make me laugh when I run into them. You prepare yourself to do a deep dive into figuring out how a system works and what needs to change and then you realize that its literally just one forgotten line of code

@Repiteo Repiteo merged commit fa29dde into godotengine:master Nov 18, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 18, 2024

Thanks!

@BlueCube3310 BlueCube3310 deleted the mobile-probe-capture branch November 28, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:rendering topic:3d
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vulkan Mobile: LightmapGI dynamic object lighting results in black objects
6 participants