godotengine / godotengine/godot
Texture Padding in tileset causing visual glitches
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Tested in latest stable 4.2.1 build only.
### System information
Windows 11 - Godot 4.2.1 - Vulkan Mobile renderer (Same happens in forward +)
### Issue description
First of all, the Tilemaps I add to my tileset always become transparent. To fix this issue I have to disable "Use Texture Padding" as seen here:

And here with the option checked:

Now, after this "quick fix", when play testing I have many lines between the tiles on screen, as shown here:

What I tried to fix this:
- Set filter to nearest
- Import all textures as Vram compressed and high quality enabled
Now what half fix it:
Reimport the texture as lossless and set to generate mipmaps. The problem is, apart from not being ideal for a mobile game, while Texture padding now works, I still have few lines in some tiles like here:

Unfortunately I cannot share my tileset since it's a paid asset with licensing, but I'll do my best to add more to this discussion.
Edit:
Now I've noticed that after setting back to Vram compressed I get an error in the editor "Cannot blit_rect in compressed or custom image formats." Which is the culprit of not being able to use a VRAM compressed image and texture padding. Still that brings the line bugs from above.
### Steps to reproduce
Import a vram compressed texture in a tileset.
### Minimal reproduction project (MRP)
Can't share I'm afraid.
Contributor guide
Research direction
Start by importing a VRAM-compressed texture into a Godot tileset with Use Texture Padding enabled, using the reported Windows 11 and Godot 4.2.1 renderer setup if available. Check the editor error about blit_rect and the visible lines or transparency between tiles; done means texture padding works without the error or visual glitches while preserving the relevant mobile texture workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100