I’m trying to write a shader skipping all internal godot lighting model. Render mode “unshaded” is pretty close what I’m looking for but I don’t know if exists some easy way to read scene lights in shader code (something like GetMainlLight/GetAdditionalLigh or similar) , or the only solution is to pass from code all relevant data.
Sure, but light() function (as far as I know) is not executed in render_mode unshaded. If I use default render mode and implement light function, the final result is split in several built-ins (SPECULAR, DIFFUSE_LIGHT, ALBEDO…) and Godot calculate internally the final fragment color. I was wondering if it’s possible to do something like Vertex/Fragment shader in Unity, write the final pixel color manually