-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Implement additional light info built-ins for spatial shader #6534
Comments
I'd also like a LIGHT_IS_DIRECTIONAL in light().. Anyone started working on this? edit: well, I'm working on it now either way :) |
I'd like to add my support for a The absence of this info is stymieing I am thankful for EDIT: Come to think of it, I might need the
|
@Wolfe2x7 definitely give it a try! I haven't been doing anything in the Godot source code recently, but if you need some assistance you could try asking in the Godot developer's chat |
@Wolfe2x7 You can take a look at my PR for Visual Shader Nodes for reference. Let me know on the developer chat if you have any questions. (My handle there is Paddy.exe) |
@novaplusplus Alright so after checking the code I noticed that the built-ins that you require are already present: Also here the docs for the written shader: Would be great if you could specify what other built-ins you would require. Otherwise I think the proposal can be closed. |
@paddy-exe |
Describe the project you are working on
3D space exploration game requiring advanced light handling for different scales and distances
Describe the problem or limitation you are having in your project
As I have been working with the light function in godot's shader code, I have been finding a few things that would help a lot that are not present, as I would like to have certain shaders handle directional lights a bit differently to other types (the specific reasoning is kinda complicated, but I feel this would be broadly useful too)
I noticed that the canvas shader has LIGHT_IS_DIRECTIONAL, LIGHT_POSITION, etc built-in variables, yet no such thing exists for the spatial shader, and I think that's unfortunate.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Introduce additional shader built-ins to allow access to the light position and whether the light is a directional light in particular, but other
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There is not much to describe - just being able to access variables of the names described or similar within the shader editor.
If this enhancement will not be used often, can it be worked around with a few lines of script?
The only alternative that I can think of would be to implement my own custom lighting engine, which would kinda suck
Is there a reason why this should be core and not an add-on in the asset library?
Addons can't really burrow deeply enough into the render pipeline
The text was updated successfully, but these errors were encountered: