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

Don't use subpasses when we're using Canvas background mode in Mobile #90191

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

BastiaanOlij
Copy link
Contributor

When using the Canvas background mode we're copying our 2D render result into our 3D buffer, then rendering 3D, do post processing, and finally copy the end result back into our 2D buffer.

In this setup we can't use subpasses when rendering 3D as we're reading from, and eventually writing to, our 2D render target.
This PR adds a check so the copy to 3D buffer, and copy back to 2D buffer, happen in separate passes instead of in subpasses.

@BastiaanOlij BastiaanOlij added this to the 4.3 milestone Apr 4, 2024
@BastiaanOlij BastiaanOlij self-assigned this Apr 4, 2024
@BastiaanOlij BastiaanOlij requested a review from a team as a code owner April 4, 2024 05:01
@AThousandShips AThousandShips changed the title Can't use subpasses when we're using Canvas background mode in Mobile Don't use subpasses when we're using Canvas background mode in Mobile Apr 4, 2024
@chrisl8
Copy link
Contributor

chrisl8 commented Apr 5, 2024

I can confirm that the errors are gone with v4.3.dev.custom_build [9e9a6fb] when running the https://github.com/godotengine/godot-demo-projects/tree/master/2d/particles demo.

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.

Makes sense!

@akien-mga akien-mga merged commit 10d67e5 into godotengine:master Apr 6, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@BastiaanOlij BastiaanOlij deleted the fix_mobile_canvas_copy branch April 8, 2024 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants