Skip to content
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

Remove obsolete LargeTexture, it's no longer useful since 3.x #48269

Merged
merged 1 commit into from Apr 29, 2021

Conversation

akien-mga
Copy link
Member

It existed in early Godot releases to allow working around hardware limitations
on max texture sizes (e.g. hardware limits of 1024x1024 pixels).

Nowadays the max texture size supported natively by Godot is 16384x16384, and
even low end mobile hardware should support at least 4096x4096.

The LargeTexture implementation is basically just an array with offsets, sizes
and textures and should be easy to replicate with a custom Texture resource if
needed - solving most of its bugs on the way as the implementation removed here
has various unimplemented or incomplete methods.

Closes #22457.
Closes #34552.
Closes #36445.
Closes #41820.
Closes #47075.

It existed in early Godot releases to allow working around hardware limitations
on max texture sizes (e.g. hardware limits of 1024x1024 pixels).

Nowadays the max texture size supported natively by Godot is 16384x16384, and
even low end mobile hardware should support at least 4096x4096.

The LargeTexture implementation is basically just an array with offsets, sizes
and textures and should be easy to replicate with a custom Texture resource if
needed - solving most of its bugs on the way as the implementation removed here
has various unimplemented or incomplete methods.
@fire
Copy link
Member

fire commented Apr 28, 2021

As part of the usability team, this is a good idea and while the feature isn’t streamed textures I think it makes it easier to reason about. I’d like to be able to get the texture via tile caching so I have mega textures but that's not a feature we wanted implemented yet.

@akien-mga akien-mga merged commit 418fe15 into godotengine:master Apr 29, 2021
@akien-mga akien-mga deleted the remove-largetexture branch April 29, 2021 07:45
akien-mga added a commit that referenced this pull request Apr 29, 2021
@ThreeMileJump
Copy link

The use of the Large Texture was, in my case, not to get around a size issue, but to allow the texture to be updated from an array of tiled images. If the source of the texture is being synthesized or manipulated in CPU space, then only partial texture updates may need to be applied. This feature of updating a region of a texture from a smaller image is already supported in OpenGL, and simply requires extending the method set_data(image) to include an offset into the larger Texture. This feature is supported in the love2d and raylib libraries.

The advantage of updating a larger texture from an array of images is that staggered texture updates or "dirty rect" schemes can be used to minimise bandwidth associated with refreshing all of a large texture in a single frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment