Skip to content

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Aug 7, 2025

Ensure the correct output texture format is selected when creating the MetalFX Spatial Shader context.

before after
metalfx_spatial metalfx_spatial_after

Note

Also verified with tps-demo and @Calinou's additions to allow selecting MetalFX upscalers.

@stuartcarnie stuartcarnie requested a review from a team as a code owner August 7, 2025 20:22
@stuartcarnie stuartcarnie added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Aug 7, 2025
@Calinou Calinou added this to the 4.5 milestone Aug 7, 2025
@Calinou Calinou moved this from Unassessed to Release Blocker in 4.x Release Blockers Aug 7, 2025
@stuartcarnie stuartcarnie self-assigned this Aug 7, 2025
@stuartcarnie
Copy link
Contributor Author

I have an addition to this PR, as it doesn't handle toggling the viewport from HDR to SDR.

@stuartcarnie stuartcarnie force-pushed the metal_fx_spatial_fix branch from bc19cf7 to c8b5982 Compare August 8, 2025 02:50
@stuartcarnie
Copy link
Contributor Author

@clayjohn I added a call to _configure_3d_render_buffers(viewport); when the viewport is toggled from SDR to HDR, to allow internal buffers to be recreated, which allows the spatial shader to update its descriptor to match the updated output format:

CleanShot.2025-08-08.at.12.52.57.mp4

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

I can reproduce the issue and confirm it is fixed. Tested on M4 Pro, macOS 15.6 (24G84).

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.

Code looks good to me.

@Repiteo Repiteo merged commit a3b42d8 into godotengine:master Aug 8, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Aug 8, 2025

Thanks!

@stuartcarnie stuartcarnie deleted the metal_fx_spatial_fix branch August 8, 2025 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release platform:macos topic:porting topic:rendering
Projects
Status: Release Blocker
Development

Successfully merging this pull request may close these issues.

5 participants