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

Shading Language Reference does not describe literals #10744

Open
markeel opened this issue Mar 4, 2025 · 1 comment
Open

Shading Language Reference does not describe literals #10744

markeel opened this issue Mar 4, 2025 · 1 comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:shaders

Comments

@markeel
Copy link

markeel commented Mar 4, 2025

Your Godot version:

4.4

Issue description:

Godot 4.4 requires uint in switch statement in a .gdshader, which requires constants and/or literals declared as uint, but there is no discussion in the Godot Shading Language description about literals.

The answer is to use <decimal number>u, but that was only figured out by guessing although looking at the GLSL language definition would give a clue as well.

URL to the documentation page (if already existing):

https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/shading_language.html

@markeel
Copy link
Author

markeel commented Mar 4, 2025

Upon re-reading, I see a mention of uint in the Constants subsection, so maybe its just me, but it would have helped me and might help others if there was a "Literals" section and not just a mention in the Constants section.

@tetrapod00 tetrapod00 added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:shaders labels Mar 4, 2025
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

No branches or pull requests

2 participants