A question regarding alpha rendring performance.

  • So I just finished the functionality for a scene for my upcoming game, and I'm about to optimize it for mobile and memory use. It's a scene where the main character's flying through some ethereal portal thingy, where I've faked 3-dimensional depth to the best of my abilities. No video, all in-engine.

    Youtube's compression isn't kind to the footage, so I recommend checking it at max quality.

    Subscribe to Construct videos now

    I achieved the effect with lots of instances of the same 128x128 texture uncropped. As C2 doesn't have the draw canvas feature, the tunnel's composed of about 100+ instances of the same sprite on screen at once. I have painful experience with overdraw, and want to reduce it as much as possible.

    I know I can crop it, but in return I need to introduce a lot more math per sprite to ensure it renders with the correct proportions due to inconsistent frame size.

    My big questions are:

    -Is an empty alpha equally expensive to draw as an alpha with lets say 50 % opacity?

    -If the alpha is empty, do I save much performance beyond just memory by cropping 30 % of the 128x128 texture?

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • -Is an empty alpha equally expensive to draw as an alpha with lets say 50 % opacity?

    Yes.

    -If the alpha is empty, do I save much performance beyond just memory by cropping 30 % of the 128x128 texture?

    The source texture only affects memory usage. If you draw it at the same size, it will use the same fillrate. If you draw it smaller, it will use less fillrate.

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