Does the size (in pixels) of an alpha/opacity mask within a texture affect render performance?

Hi guys!

if you have a for example 1024x1024 texture with an alpha channel. for example a leaf on it and a plane mesh uses that texture. (using complete UV space)

does the size of the masked area (black area in alpha channel) affect performance?

means: if the leaf on that texture is bigger and using the texture space better (alpha area is smaler). is the performance better? (if you place thousands of these leafs into a scene).

hope the question is understandable and thanks in advance! :slight_smile:

Hey TESN,

It all depends on how you are calling the material to be rendered and the amount of instructions within the shader. For example, if you have a low instruction count and are an unlit masked material, your performance should be fine. However if you have a high instruction count in conjunction with per pixel lighting and two sided masked translucent material, it will be quite expensive to render that single plane.

The size of the mask is all preference on how you plan on using the texture. If it is going to be a particle effect like falling leaves, you need to be precise to set up the proper Sub UV so optimizing your texture space is important. You generally want to optimize your UV space anyway so you do not need to a bunch of scaling.

I hope this clarified a bit.

Cheers,