Skip to content

Shader docs don't distinguish between global and constant built ins #11048

@clayjohn

Description

@clayjohn
Member

Your Godot version:
4.5 dev

Issue description:

The shader doc pages list global built ins, and per stage built ins (vertex, fragment, light, etc.). The idea being that globals are built ins that you can access from any function. However, a user requested to access globals from outside functions in godotengine/godot#55429. So in godotengine/godot#55431 we introduced the concept of constant built ins which can be accessed from inside and outside functions.

Importantly constant built ins can be accessed outside functions while global built ins can only be accessed inside functions.

Right now the docs simply say:

Global built-ins are available everywhere, including custom functions.

Which is not wrong, but it is unclear. We should have two separate categories once for global built ins and one for constant built ins so users know which ones can be used outside functions

URL to the documentation page:

https://docs.godotengine.org/en/latest/tutorials/shaders/shader_reference/spatial_shader.html#global-built-ins

Activity

added
area:manualIssues and PRs related to the Manual/Tutorials section of the documentation
on Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @clayjohn

        Issue actions

          Shader docs don't distinguish between global and constant built ins · Issue #11048 · godotengine/godot-docs