Skip to content

Fix updating lightmap captures on Mobile#99367

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
BlueCube3310:mobile-probe-capture
Nov 18, 2024
Merged

Fix updating lightmap captures on Mobile#99367
Repiteo merged 1 commit into
godotengine:masterfrom
BlueCube3310:mobile-probe-capture

Conversation

@BlueCube3310

@BlueCube3310 BlueCube3310 commented Nov 17, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Updated my MRP to this PR:
light_probes_mobile.zip

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

Mobile_Probes.mp4

@Calinou Calinou left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

@clayjohn clayjohn left a comment

Copy link
Copy Markdown
Member

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
@Repiteo

Repiteo commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

Thanks!

@BlueCube3310 BlueCube3310 deleted the mobile-probe-capture branch November 28, 2024 20:21
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 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

7 participants