Godot 4.4
I have a 3d scene in which I have a mesh of an old cabinet CRT TV. This TV has a screen with a Viewport Texture assigned to it, and within that SubViewport is a variety of 2d elements. However in order to simulate the variable light of an actual TV being cast into the room I have a second SubViewport with identical 2d elements and a blur shader, which I have assigned to a Spotlight3D. This only works by running this function continually through the _process function:
func light_reset():
light_projector.light_projector = null
light_projector.light_projector = $"TV Light".get_texture()
This works great and isnt a performance problem or anything, however, I then receive this warning EVERY FRAME:
“ViewportTexture cannot be used as a Light3D projector texture (). As a workaround, assign the value returned by ViewportTexture’s get_image()
instead”.
Provided I’m applying this change correctly (which I assume is the case as it doesn’t throw errors of any kind) the projector no longer works, if I try to ignore the warning, I cannot due to it not having a specified type (as far as I can tell). This is obviously very obnoxious, I do fully understand that according to the docs this workaround I am using is specifically not supported hence the warning, but I am simply unwilling to let it go and it literally still functions, I should at least be able to ignore the warning.
If I am leaving out any relevant code, Images, or other information that may help you help me please let me know. Thank you for reading!