Gerente Posted August 4, 2015 Share Posted August 4, 2015 Hi, I have an app that is a kind of photo gallery, after loading 10 photos in a mobile the browser crash (Iphone 6)It is probably related with Memory, each image its about 300kb.I have been using .dispose() before assign the texture but it does not have effect. sphere.material.emissiveTexture.dispose();sphere.material.emissiveTexture = texture;I'm desperate, I really don't know how to fix this. Any advice is welcome. Thanks Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 4, 2015 Share Posted August 4, 2015 The image size is usually not the problem. It's the image's resolution that can cause those kinds of things. The image's are stored uncompressed in the gpu.Try reducing the resolution of the images. A simple calculation:a JPG needs 24 bits per pixel (thou I am pretty sure that textures are all stored using 32 bits). a 1000x1000 image takes 1000x1000x24 bits, meaning - 24,000,000 bits. which are ca. 3 MB. A 2000x2000 image will take 112MB. 10 Images will take 1120MB. Your desktop GPU will be able to handle this. a mobile GPU will have a hard time. NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Gerente Posted August 4, 2015 Author Share Posted August 4, 2015 The image size is usually not the problem. It's the image's resolution that can cause those kinds of things. The image's are stored uncompressed in the gpu.Try reducing the resolution of the images. A simple calculation:a JPG needs 24 bits per pixel (thou I am pretty sure that textures are all stored using 32 bits). a 1000x1000 image takes 1000x1000x24 bits, meaning - 24,000,000 bits. which are ca. 3 MB. A 2000x2000 image will take 112MB. 10 Images will take 1120MB. Your desktop GPU will be able to handle this. a mobile GPU will have a hard time. Thanks for the advice, I'll check if I can change the image resolution without loosing quality. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.