You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a HeightMap module , and when the heights are edited it would be nice to be able to update only a sub-rectangle of the textures instead of the full 2048x2048 pixels (or the full 512x512 rects if the textures are chunked on superlarge terrains). My editing process is chunked already for memory efficiency, but uploading the textures would also make it faster with this feature (it's currently unbearable at size 2048)
Another use case would also be Virtual Textures, or a way to simulate huge textures by streaming it through an atlas.
The text was updated successfully, but these errors were encountered:
I had a read in RasterizerStorageGLES3 to see how texture data is uploaded, and I have to admit a few things:
The function already uses glTexSubImage2D with full rectangle (while I need sub-rectangle)
However it does that only if TEXTURE_FLAG_USED_FOR_STREAMING
Many other options come into play, including mipmaps
If I implement sub-region, it may come with incomplete support of these features, I don't know how feasible (or relevant) it is to handle them all (any advice?)
My use case stems from the fact that editing 8-bit and 16-bit texture on CPU is awfully slow currently, because uploading it as a whole in realtime to see the result is way too slow, and won't be an option at all with big terrains. But at the same time, I wonder if it's a good idea to implement sub-rect upload with limited features. I could subdivide the heightmap in plenty of smaller textures (which I might do in the future to support streamed terrains), however I fear that this affects performance...
I could also investigate GPU painting, which would be pretty fast but would limit texture size to renderbuffer size, and I'm not sure if that would work while keeping the same formats I currently use (RH for heights, RGB8 for normals, RGBA8 for splats, R8 for discard). Also i would be unable to paint on the alpha channel since there is no blending mode for it.
WDYT @reduz ?
I'm writing a HeightMap module , and when the heights are edited it would be nice to be able to update only a sub-rectangle of the textures instead of the full 2048x2048 pixels (or the full 512x512 rects if the textures are chunked on superlarge terrains). My editing process is chunked already for memory efficiency, but uploading the textures would also make it faster with this feature (it's currently unbearable at size 2048)
Another use case would also be Virtual Textures, or a way to simulate huge textures by streaming it through an atlas.
The text was updated successfully, but these errors were encountered: