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

RandomRange VisualShader Node throws error when connected to Varying Setter #101085

Closed
michaelharmonart opened this issue Jan 3, 2025 · 0 comments · Fixed by #101648
Closed

Comments

@michaelharmonart
Copy link

Tested versions

Reproducible in 4.4 dev 7

System information

Godot v4.4.dev7 - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Thu, 19 Dec 2024 20:32:41 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 3060 (nvidia; 565.77) - AMD Ryzen 9 9900X 12-Core Processor (24 threads)

Issue description

When the RandomRange node is only connected to a VaryingSetter like so:
Image
The shader code is generated without the function definition as such:
Image

When connected to the vertex color output as well for example:
Image

It now generates correctly:
Image

Seems as though the check for how to include the function needs to be aware of the VaryingSetter as well.

Hopefully it's an easy fix :)

Steps to reproduce

Connect a RandomRange Setter to a VaryingSetter in the Vertex Shader
Connect the VarryingGetter to the Albedo in the Fragment Shader

Check the generated shader code and notice the error from the lack of function definition.

Minimal reproduction project (MRP)

random-range.zip

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

Successfully merging a pull request may close this issue.

3 participants