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

Shaders : Specifying instance index and declaring a uniform doesn't seem possible syntax-wise #62942

Closed
Knand1861 opened this issue Jul 12, 2022 · 3 comments

Comments

@Knand1861
Copy link

Godot version

4.11 alpha

System information

Windows 11

Issue description

I could not figure out the way that I can specify both hint + default value and instance_index();

Steps to reproduce

instance uniform float g: hint_range(0.0,1.0,0.1) = 0.5 : instance_index(5); ?

Minimal reproduction project

No response

@Knand1861 Knand1861 changed the title Shaders : specifying instance index and declaring a uniform Shaders : Specifying instance index and declaring a uniform Jul 12, 2022
@Knand1861 Knand1861 changed the title Shaders : Specifying instance index and declaring a uniform Shaders : Specifying instance index and declaring a uniform doesn't seem possible syntax-wise Jul 12, 2022
@Calinou
Copy link
Member

Calinou commented Jul 12, 2022

@Knand1861 Please upload a minimal reproduction project to make this easier to troubleshoot.

@Calinou
Copy link
Member

Calinou commented Jul 13, 2022

As per the other linked issues, can you test this in a 3D (spatial) shader instead of a 2D (canvas_item) shader?

Streq pushed a commit to Streq/godot that referenced this issue Feb 9, 2023
@bitsawer
Copy link
Member

Thanks for the report! You can simply use a comma, like this:

instance uniform float g: hint_range(0.0,1.0,0.1), instance_index(5) = 0.5;

Closing this issue, but feel free to comment or re-open the issue if the solution doesn't work for some reason.

@bitsawer bitsawer closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants