Godot Version
4.6
Question
I have recently implemented an edge detection spatial shader and now wanted to change the shading logic for pixels on edges a bit in the light function. The problem I have encountered is the following: How do I best transfer the info that a pixel is an edge from the fragment function, where the edge detection is calculated, to the light function?
Currently I am just hijacking the roughness built-in, since I am currently not using it, but I might want to in the future. Is it really necessary to put the information about if a pixel is an edge in a texture first to then read it later in the lighting calculations for something so simple, or is there a better way?