Welcome aboard!
There seems to be a limit to the size of a texture, regardless of the maximum dimension.
If you use the max dimension for X and max/16 for Y it does work (on my iPhone SE):
But if you use max/8 (or higher) for Y, it does not work anymore.
Thanks, Do you know how to use the ConvertPanoramaToCubemap method of PanoramaToCubemapTools? How to convert an Image object to the first parameter?
You can use Texture.readPixels
to get the content data of a texture in a RGBA format. ConvertPanoramaToCubemap
expects RGB, though, so you will have to convert the buffer from RGBA to RGB. This PG is doing that in the getFloat32ArrayFromArrayBuffer
function, if it can help.
It may seem useful, but, using the getFloat32ArrayFromArrayBuffer
can consume a large amount of memory. Do you have any good ideas?
You have no choice but to create a buffer with the data, i.e. a buffer of size width*height*3
.
Thanks,I’m trying to use the panorama-to-cubemap library and it seems pretty goods.