On Chrome Android, when loading a texture (KTX2, w=8192, h=2048 with alpha) the texture remains black and I get the console error:
ERROR :GL_INVALID_VALUE : glCompressedTexImage2D: dimensions out of range
It works fine on PC so must be related to phone’s hardware.
I am trying to understand how
renderer.capabilities.maxTextureSize can be used to determined the limits of a
For example, when maxTextureSize = 16384, what are the maximum width and height of the compressed texture in pixels in case aspect ratio must be 4 ? And does it matter if the texture has alpha or not? The Android’s maxTextureSize = 4096.
Thanks for helping!
I was making it all over complicated: renderer.capabilities.maxTextureSize is not the total bytes or so of a texture block/memory but simply the max size in pixels in each direction:
renderer.capabilities.maxTextureSize = 4096 means : max 4096x4096px…yeah wow
Actually, it is not as straightforward and i fail to find an answer. our application uses
renderer.capabilities.maxTextureSize to determine what assets to fetch. works great on mobile devices EXCEPT the Quest2 (no link cable). The Quest2 reports the same
maxTextureSize as my PC…I wish. See below.
As a result, the app goes black/textures cannot be allocated (
RangeError: Array buffer allocation failed). Does anyone have suggestions to interpret the capabilities such that I will not have any problem?
It is possible that the browser says a certain texture dimension is technically supported but during the app usage the device runs out of memory. I would try to monitor the actual memory usage of my app and verify if there is an overflow.
You also might want to consider to report the issue to Oculus. If there is enough memory but the browser still does not allow an allocation, this indicates a potential browser issue.