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

Add multiple renderer support to Advanced Postprocessing #10244

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

tetrapod00
Copy link
Contributor

Addresses #10204.

Adds code for the Compatibility renderer to the Advanced Postprocessing page.

With godotengine/godot#98549 merged, there is now a way to detect the renderer in shaders that has low no runtime cost. Unlike using OUTPUT_IS_SRGB, it also is obvious what it does. Alternately, CLIP_SPACE_FAR could be used in the example here, since NDC depends directly on that value. But the math to do so is non-obvious, and using a renderer define here is more obvious and instructive.

@Calinou Calinou added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:shaders cherrypick:4.3 and removed cherrypick:4.3 labels Nov 11, 2024
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.

Looks good to me.

Note: Not cherry-pickable to 4.3, as this feature is only in 4.4.

@tetrapod00
Copy link
Contributor Author

tetrapod00 commented Nov 11, 2024

I can make a separate cherrypickable version that either

  • does not mention supporting multiple renderers, only adds the Compatibility NDC snippet
  • uses the jankier OUTPUT_IS_SRGB and runtime if() to detect the renderer

@mhilbrunner mhilbrunner merged commit 96fe4d1 into godotengine:master Nov 12, 2024
1 check passed
@mhilbrunner
Copy link
Member

Thank you!

@tetrapod00 tetrapod00 deleted the advanced-postprocess-ndc branch November 12, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:shaders
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants