I want to make a 2D object that becomes transparent when light hits it. This is completely opposite to the light_only
light mode. To be honest light_only doesn't work in Godot 4.0, it's fixed in 4.1
In Godot 3 I would use shader with AT_LIGHT_PASS
. But in Godot 4 AT_LIGHT_PASS
always get false.
Also I was trying to use light()
in Godot shaders but it's only adds on COLOR
, so I can't set alpha 0.0 on LIGHT
to make texture transparent.
I found solution