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

Use double comments in shader template light functions #97024

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

tetrapod00
Copy link
Contributor

@tetrapod00 tetrapod00 commented Sep 14, 2024

This PR adds a second layer of commenting to the light() function of CanvasItem and Spatial shader templates, so if you select and uncomment the light() function, you have a valid shader.

Current behavior:
If you create a new Spatial or CanvasItem shader, the template comes with a commented out light() function:
Godot_v4 3-stable_win64_uZaOueifXP

But if you select it and uncomment it with ctrl+k, you have a shader with a compile error, since the template only uses a single level of commenting:
Godot_v4 3-stable_win64_2H9RUF2Nyc

This PR:
Tested on the CI artifact:
Shader template:
godot windows editor x86_64_KoKRfcQCK9

Select and uncomment the light function, and you have a valid shader:
godot windows editor x86_64_qS4QuUrel0

@tetrapod00 tetrapod00 requested a review from a team as a code owner September 14, 2024 23:22
@Chaosus Chaosus added this to the 4.4 milestone Sep 15, 2024
@akien-mga akien-mga merged commit 32cf20c into godotengine:master Nov 29, 2024
20 checks passed
@tetrapod00 tetrapod00 deleted the shader-create-comment branch November 29, 2024 21:59
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants