Expose METALLIC
in the light()
function for spatial shaders
#1604
Labels
METALLIC
in the light()
function for spatial shaders
#1604
Describe the project you are working on:
Writing a spatial shader with custom lighting code
Describe the problem or limitation you are having in your project:
light()
doesn't expose aMETALLIC
built-in which is needed for correct lighting calculation.Describe the feature / enhancement and how it helps to overcome the problem or limitation:
My workaround is using
metallic
which is a variable in Godot's shader code. This could break with any other version of Godot, having a proper built-in would be preferrable.Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
This would just be another built-in defined exactly like
ROUGHNESS
.If this enhancement will not be used often, can it be worked around with a few lines of script?:
Not really, no.
Is there a reason why this should be core and not an add-on in the asset library?:
It seems like a nice minor QoL improvement, and I don't know enough about add-ons to say if replacing the core shaders is possible or feasible.
Thanks!
PS: I'm not exactly familiar with Godot internals, but this seems simple enough that I could send a PR myself, if this is deemed useful.
The text was updated successfully, but these errors were encountered: