Godot Version
4.2 & 4.3 rc2
Question
When I try to import a .png image and use it in PointLight2D, at some point the texture starts to repeat itself as an artifact. Changing the import mode to VRAM Compressed without high quality checkmark solves the problem, but due to compression the sprite changes greatly. In any other cases the problem persists. Image is in RGBA 8bit/channel format.
Is there a way to fix it?
Note: In other nodes, for example TextureRect, there is no problem.
Example:
Is there any reason you want to set this as the light’s texture, instead of just being the texture the light is shining on? A PointLight2D
’s texture is usually for determining its size and falloff pattern.
TextureRect, as far as i know, doesn’t have neither mix nor add blend modes, and it is the reason why i’m using PointLight2D + I use normal maps on large chunk of my scene.
I could add a separate PointLight node for each instance of that small light, but it will stack up very fast and will cause large performance issues.
And as i discovered later, this artifact only occurs on Forward+ rendering method.
I think I end up grouping these small light into groups of larger Point Lights since I can’t change the render method.
But I still think this is a bug with Forward+.
Ahhh, you’re trying to do blend modes! TextureRect is a child of CanvasItem, which you can give a CanvasItemMaterial for blend modes and light modes.
I found a way to implement my original idea, but these artifacts still exist when using Forward+. I don’t think there is any specific way to repeat this, as it happened when importing B&W gradients, some light sprites and in the image pinned above.