-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Reading VIEWPORT_SIZE in light() function breaks spatial shader. #76861
Comments
Related to #76556 We need to make sure that the light builtins are properly exposed in the light shader with the appropriate names (the variables are likely already available, they just need to be renamed) |
@clayjohn Hi, I am a newbee to open source projects and currently being a computer science student in HKUST, I want to gain more project experiences before graduation so I want to help for open source projects, I am willing to learn new techniques and help with this issue. Can you assign this issue to me and give me more information about it? Do I need to fix #76556 before fixing this issue? |
For future reference, we only use the assignees feature for core contributors (and we don't always use it in the first place). Since contributors can leave at any time for any reason, we'd rather avoid a situation where nobody is working on an issue because it's assigned to someone who is no longer active. |
You do not need to fix #76556 before fixing this issue. The light shader code is defined here:
You can see here the variables that are renamed to be compatible with the names expected by the light shader:
Here you can see that So you need to ensure that |
Godot version
4.0.2.stable
System information
Windows 11, Vulkan, RTX2070 Super
Issue description
Reading from
VIEWPORT_SIZE
in thelight()
function causes spatial shader to break and renders as default white.Steps to reproduce
when line 51 is present the fails to compile with the following message in the output log but no compilation errors.
commenting out line 51 solves this issue.
The documentation states that
VIEWPORT_SIZE
should be available to thelight()
function.Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: