|Topic was automatically imported from the old Question2Answer platform.
I’m using Godot 4.0 beta 3. This issue doesn’t exist in Godot 3.44.
I need to do some pretty technical things with shaders, and I want to store height data as textures in world space with PointLight2Ds. Everything is working well now, except for one unexpected thing I can’t avoid. The shader I’m using needs accurate values, but the texture I put in the PointLight2D is wrong (not sure if it’s compressed?).
The Sprite on the left displays everything fine. In the middle I have a PointLight2D set to ‘mix’ mode with the texture, which should result in something identical. Except it’s not. The rows near the bottom have been flattened and the gradient doesn’t go all the way down. I don’t know if this is compression. It’s not like the darkest few shades are being ignored, as the columns still have the right gradient with the same values.
When the texture resource was imported, I made sure the compression mode was ‘VRAM Uncompressed’. I also tried ‘Lossless’ and all the others. The only thing that got rid of this artefact was setting the compression mode to ‘Basis Universal’ with Mipmaps enabled.
This still doesn’t work for me though, as the image resolution is changed and there’s blurring, which is unsuitable for 2D pixel art and the light won’t line up with the sprites for computation.
Have you managed to fix this?
It might be linked to my issue https://forum.godotengine.org/149148/blurry-texture-image-in-shader but I can’t find a way to fix this… I try setting everything to lossless, Nearest, reimporting the image, nothing works…
bl0ggy | 2023-03-11 23:32