Skip to content

Add custom upscaler implementation to RD renderer#114670

Open
BastiaanOlij wants to merge 1 commit intogodotengine:masterfrom
BastiaanOlij:custom_upscaler
Open

Add custom upscaler implementation to RD renderer#114670
BastiaanOlij wants to merge 1 commit intogodotengine:masterfrom
BastiaanOlij:custom_upscaler

Conversation

@BastiaanOlij
Copy link
Copy Markdown
Contributor

@BastiaanOlij BastiaanOlij commented Jan 7, 2026

This PR implements a solution to allow creation of custom upscalers. It's based on the same approach we've used for compositor effects, e.g once configured the rendering engine does a callback into the custom code to perform the actual upscaling.

The current approach only targets Forward+ and performs upscaling right after 3D rendering but before post processing similar to FSR2 and Temporal MetalFX. In theory you should be able to re-implement either using this approach.

Very simple test project that does a 2x2 upscale:
https://codeberg.org/BastiaanOlij/test-custom-upscaler

Only outstanding issue that I'm not sure how to solve is that I can't set project settings for this so the default viewport is setup with a custom upscaler. The main issue here is that we suppress MetalFX, so adding Custom as a enum at the end is not possible (unless there is an alternative way to fill the dropdown).

Implements: godotengine/godot-proposals#13718

Comment thread doc/classes/RenderSceneBuffersConfiguration.xml Outdated
Comment thread doc/classes/RenderSceneBuffersRD.xml Outdated
Comment thread doc/classes/RenderSceneBuffersRD.xml Outdated
Comment thread scene/resources/viewport_upscaler.h
Comment thread scene/resources/viewport_upscaler.h
@BastiaanOlij BastiaanOlij marked this pull request as ready for review January 8, 2026 06:21
@BastiaanOlij BastiaanOlij requested review from a team as code owners January 8, 2026 06:21
@HydrogenC
Copy link
Copy Markdown

Is it planned to also migrate the builtin upscalers (like MetalFX, FSR1 and 2) to this API? This would reduce some duplicate code in render_forward_clustered.cpp.

@BastiaanOlij
Copy link
Copy Markdown
Contributor Author

Is it planned to also migrate the builtin upscalers (like MetalFX, FSR1 and 2) to this API? This would reduce some duplicate code in render_forward_clustered.cpp.

Not at this time, and it would only be able to replace FSR2 and Temporal MetalFX if we choose to do so.

Implementing those two as subclasses of this does make sense to me, but I think that should be a longer term goal.
Also at that point we may not want to call this custom upscaler but just upscaler :)

Comment thread servers/rendering/rendering_server.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants