Skip to content

Document writing shaders that work in multiple renderers #10204

Open
@tetrapod00

Description

@tetrapod00

Your Godot version:
4.4
Issue description:
Since godotengine/godot#97142 allowed falling back from Vulkan/D3D12/Metal to OpenGL, it is now more expected that rendering, including shaders, works on multiple renderers.

We should document writing shaders that work in multiple renderers, using OUTPUT_SRGB, CLIP_SPACE_FAR, and/or CURRENT_RENDERER (once godotengine/godot#98549 is merged).

This is currently half-documented in two places:

Changes to make:

  • Advanced postprocessing should include a snippet for using CLIP_SPACE_FAR to create correct NDCs for all renderers.
  • Possibly, some shader page should include a general section on writing shaders that work in all renderers. Possibly, the Renderers page should link to that shader section.

URL to the documentation page (if already existing):
https://docs.godotengine.org/en/latest/tutorials/migrating/upgrading_to_godot_4.html#updating-shaders
https://docs.godotengine.org/en/latest/tutorials/shaders/advanced_postprocessing.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationenhancementtopic:shaders

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions