-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images with big AtlasTextures are broken in systems with AMD GPUs #87119
Comments
Can confirm on my AMD setup, but also on a lowend Nvidia laptop. I think this might actually be a hardware limit. Most graphics card can only go up to 16k resolution, and your image surpasses that. Both my GPUs can only work with 16k textures max. But I don't know how Godot handles this, whether it "cuts" image resolution down or not when working with atlas textures. |
if this is just a limitation of some graphics cards then it might be a good idea to add a warning in the editor. |
The editor wouldn't work for this as it isn't helpful to just know the limitations of your hardware, you might end up running things on weaker hardware for example See here for one recommendation, which your texture goes far over, the editor could warn about this limit, but it would again depend on the target OP: Could you check the result of I'd suggest reducing the size of your textures, and consider other methods, atlas textures are, as far as I recall, not necessarily the huge deal that they once were, with modern rendering hardware, but I suspect you don't actually need this huge atlases in your project, ensure that you limit how much data you're using at any one time and make sure it's relevant to what you're doing, if you are needing this much data consider using other approaches, this is pushing a lot of limits |
This is interesting. The result I get is I mainly use these huge atlases for the sake of convenience. One file, one enemy, done. That sort of a thing. The other thing is, the bigger the AtlasTexture, the bigger the VRAM savings. Perhaps not by a huge margin, but still. Once we have AtlasTexture imports working consistently with Mesh2Ds, we will be in a better place. I can split these up, the VRAM usage shouldn't increase too much. Let me try that. |
But you need to keep in mind the range of hardware you could run it on, granted the 8k suggestion is seemingly a bit out of date, but it's still a good safe suggestion I'd say, note that the numbers there aren't always representative due to duplicates etc. So I'd suggest to at least restrict yourself to the 16k, and preferably lower to be able to cover more targets, don't rely on the things your own hardware can manage, it's hard to plan and test, but it's good to be conservative when you're able |
To complement @AThousandShips's point, 16k textures are absolutely massive even for today's standards. Unity only supports 16k as maximum size too, and Unreal Engine is even lower at 8k textures. Using the AtlasTexture is not the wrong approach; your base image resolution is simply too big. |
Didn't realize that this was related to the generation of atlas textures from multiple input files, so this might be something to look into as a configuration thing to allow wider but less tall textures, as the current setup limits the width to Edit: I've done some testing and while it's not (currently) possible to add this to the import itself, as group files can't have common settings of this kind, it can be a project setting, will do some further testing and see about opening a PR for this |
Opened a draft PR for this, it works basically well, but needs some testing and discussion, let's keep the general topic here With this PR and modifying the setting to Edit: doing so also fixed the rendering in my testing |
The |
@AThousandShips possible regression for this in 4.3? Some of my user's atlas textures are not respecting the new property that was introduced. |
Please open a new report, as this would be a different issue |
Tested versions
4.2 stable
System information
Windows 11 - 4.2 stable - AMD 7900xtx
Issue description
For sprites embedded within large atlas textures, the visual gets corrupted.
This issue only seems to occur with AMD GPUs, and not on any NVIDIA GPUs that have been tested.
I've only been able to test and repro this with 'debug export' builds.
Please export attached project and test on AMD GPU to repro.
See attached video
Steps to reproduce
Sprite.Test.Glitch.mp4
Minimal reproduction project (MRP)
Sprite_Test.zip
The text was updated successfully, but these errors were encountered: