godotengine / godotengine/godot
`AtlasTexture` margin size.x/y has no effect if corresponding region size.x/y is zero
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.4 beta 2
### System information
Windows 10
### Issue description
Docs say:
> If either dimension of the region's size is 0, the value from atlas size will be used for that axis instead
But it does not work well with margins as issue title says:
| One axis is zero | Both axises are zero |
| --- | --- |
|  |  |
Discovered during https://github.com/godotengine/godot/pull/102467
This behaviour may be confusing. Worth to fix in code or document it.
### Steps to reproduce
Add archive content from "MRP" to project, set region size to (0, 0), try to change margin size.
### Minimal reproduction project (MRP)
[atlas_texture_bugged.zip](https://github.com/user-attachments/files/18683785/atlas_texture_bugged.zip)
Contributor guide
Assessment
This issue has not been assessed yet.