GL_BLEND problem with drawing 2D sprites on iPad

When we draw 300 sprites on the iPad using opengl 2.0 with glEnable (GL_BLEND) (which we need because the sprites need transparency and alpha blending), we get a frame rate of about 40. But when we turn off blending, we get a frame rate of 60 .

Is (alpha) mixing really expensive now or are we doing something wrong?

Thanks for your time, Richard.

+3
source share
2 answers

The alpha mix is ​​really so expensive. The problem is that you can solve many problems with redundant code (which is very convenient for PowerVR) using Z-Buffering. It can save a ton of memory bandwidth by not writing to the Z-buffer and draw a buffer.

, -, , (Read-Modify-Write RMW). , 10 , 10 , , Z-Buffered ( ish.. PowerVR - ) , . , WRITE, -. , , - .

, , Z-. , Z- , , Z- , , . , PowerVR , , , , RMW -.

+4

. --.

fragment * alpha + previous * (1 - alpha)

, , ( ). , , , , .

+1

Source: https://habr.com/ru/post/1768245/


All Articles