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 documentation for hint_enum uniform in shading_language.rst #9841

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

ArceusMaxis
Copy link
Contributor

Added explanation regarding hint_enum behaviour and usage in Uniforms section. Also added a row in the Uniforms section table to reflect this new hint type

This PR is documentation regarding : godotengine/godot#94324

@AThousandShips AThousandShips changed the title Adding documentation for hint_enum uniform in shading_language.rst Add documentation for hint_enum uniform in shading_language.rst Aug 26, 2024
@AThousandShips AThousandShips added area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:shaders labels Aug 26, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Aug 26, 2024
tutorials/shaders/shader_reference/shading_language.rst Outdated Show resolved Hide resolved
tutorials/shaders/shader_reference/shading_language.rst Outdated Show resolved Hide resolved
tutorials/shaders/shader_reference/shading_language.rst Outdated Show resolved Hide resolved
tutorials/shaders/shader_reference/shading_language.rst Outdated Show resolved Hide resolved
@ArceusMaxis
Copy link
Contributor Author

Should i rebase? i seem to have committed each requested change as separate commits, also, for future reference, how can i make all requested changes in a single commit? Thank you for your guidance AThousandShips, i really appreciate it!

@AThousandShips
Copy link
Member

Squashing the commits would be appreciated

Added explanation regarding ``hint_enum`` behaviour and usage in Uniforms section.
Also added a row in the Uniforms section table to reflect this new hint type

This PR is documentation regarding : godotengine/godot#94324
Co-authored-by: A Thousand Ships <[email protected]>
Copy link
Contributor

@tetrapod00 tetrapod00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation is correct. Style looks fine.

I tested this in 4.4dev4 Compatibility with this shader, and it works as expected:

shader_type spatial;
uniform int noise_type : hint_enum("OpenSimplex2", "Cellular", "Perlin", "Value") = 0;
uniform int character_speed: hint_enum("Slow:30", "Average:60", "Very Fast:200") = 60;
void vertex() {}
void fragment() {
	ALBEDO = vec3(float(noise_type)/4.0);
	ALBEDO = vec3(float(character_speed)/200.0);
}

@tetrapod00 tetrapod00 merged commit 1b51bb7 into godotengine:master Nov 20, 2024
1 check passed
@tetrapod00
Copy link
Contributor

Thanks! And congratulations on your first merged docs pull request!

@ArceusMaxis
Copy link
Contributor Author

Thank you ❤️❤️🥹

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