A question about transparency

0 favourites
  • 6 posts
From the Asset Store
Vector illustration of 5 spiral characters with transparency in 3 different colors.
  • Transparent pixels are rendered even if nothing is there. A giant transparent sprite will eat a huge chunk of memory even though nothing is visually put on screen.

    So my question is. If I have a collision sprite and set it to not visible.

    Will this object be treated as if transparent and take up gpu resources. Or is it ignored altogether saving draw calls and not going to affect the gpu.

  • I don't think it will have any considerable impact on the FPS, which is mostly an issue for mobiles I would assume. However the image is still considered an image even if invisible and will take up as many resources as if it was transparent.

  • There's two sides to the question:

    • the source image has to be held in memory, and if it is large it will take a lot of memory, even if it is transparent
    • if it is drawn, transparent pixels still use up rendering bandwidth even though no visual change occurs

    If you set it invisible it is not drawn, so that is not a concern. So then if you make it a small image (e.g. 32x32) and stretch it up as big as it needs to be, it won't use much memory either.

  • So then if you make it a small image (e.g. 32x32) and stretch it up as big as it needs to be, it won't use much memory either.

    Never really thought about this taking less resources, but its actually quite a lot you can reduce it if you need collision sprites that are invisible and then just stretch the hell out of them. made a sprite with 150000x150000 and it only used est. 0.3 mb original size was 128, so good to know

  • Great to know.

    Thank you all for your replies.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • > So then if you make it a small image (e.g. 32x32) and stretch it up as big as it needs to be, it won't use much memory either.

    >

    Never really thought about this taking less resources, but its actually quite a lot you can reduce it if you need collision sprites that are invisible and then just stretch the hell out of them. made a sprite with 150000x150000 and it only used est. 0.3 mb original size was 128, so good to know

    Why the hell would you ever need a sprite 150,000 x 150,000 pixels?! God damn, people.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)