Power-of-two textures performance benefits with modern WebGL -


we're using pixi.js games internally uses webgl rendering. every , i'm stumbling across mentions of power-of-two , possible performance benefits of avoiding npot textures (https://developer.mozilla.org/en-us/docs/web/api/webgl_api/tutorial/using_textures_in_webgl#non_power-of-two_textures, https://github.com/pixijs/pixi.js/blob/master/src/core/textures/basetexture.js#l116). confusingly there mentions doesn't make difference anymore (opengl - power of 2 textures). webgl , browser development moving fast it's hard tell of these bits of information accurate.

specifically i'm wondering whether overhead of padding images create pot textures (longer downloads, increased memory usage) worth performance benefits (if indeed exists). couldn't find comparison or performance benchmarks comparing pot vs npot textures , sadly don't know how go creating 1 myself.

does have experience in regard or up-to-date numbers? there way of measuring webgl performance?

i think of answers going "depends on hardware/driver/gpu", "you have test yourself" or "it wouldnt slower (but caveat have test across gpus make sure)".

rather worry padding images pot should use texture alias (sprite sheet) instead. or request people behind pixi implement it. using texture alias pot dimensions, best of both worlds: minimal padding wastage, guarantee pot texture perform no slower npot texture, and reduced gl state changes.

i cant stress how big of improvement can reduced gl state changes. implementing texture aliasing , draw batching can draw 2d sprites required in realistic setting; ~150k moving, rotating , resizing sprites @ 60fps (bound cpu calc new transform each sprite every frame)


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -