-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
using a varying in the vertex shader and not using it in any other stage yields an error #50464
Comments
I don't think it's a bug since It's proposed by @reduz (#44698 (comment)). If this is undesired I could fix this of course... |
Oh sorry @Chaosus, I didn't know. I think it's valid to use a varying only in the vertex shader, because while a finished shader doesn't do this, while you're developing a shader you might have plenty of these instances. If we are against this still, the error message needs to be made more explicit. I wasn't sure what was the issue, and I tried adding more keywords to the varying (fragment, vertex etc.) |
Do you mean assign in the vertex shader? Because varyings are the mechanism of translation variables between functions so there is no point to use it in the vertex shader rather than assign and use it in a fragment + now it's not only limited to the vertex but can be used to fragment->light or vertex->light etc, |
In the above example I was developing a shader so I didn't get yet to the part where I was using it, and it's annoying when the shader is incomplete, because it errors in the middle of development. This is the only case where an unused variable causes an error and not a warning |
We can use the new warning system to emit a warning for a misused |
Godot version
v3.4.beta.custom_build [a3310c1]
System information
Linux Arch, Radeon RX 590
Issue description
This shader code does not compile
Steps to reproduce
see above
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: