Question regarding GUI buttons and its memory consumption

Hi Everyone!

I’ve been working on reducing the memory consumption to help with running on Safari/IoS.
I’ve made a mesh that has an advance dynamic texture that uses a gui button to update a mesh’s texture.
Upon checking on the graphics layer, it seems that the gui button is taking around 4MB.

Is there a way to reduce its size so it would take up less memory or is there something else that is causing this or missing?

I’ve made a sample playground with the implementation for this https://www.babylonjs-playground.com/#08A2BS#157 (note: please use version 4.2)

Any help on this is greatly appreciated.
Thanks and Warm Regards

Hmmm the most obvious thing I would try is reducing the resolution of the GUI canvas :thinking:

1 Like

But how does one go about doing that?

The GUI creation methods have parameters for width and height of the canvas :slight_smile:

They’re 1024x1024 by default, you can try reducing them

1 Like

It worked!
I updated the playground and it worked!

Thanks so much for the help!