8 ms·
Vertex skinning is a pain in GLES 2 because of uniform size limits, since there are no UBOs. You can only have so many bones before you overflow those limits an
by pcwalton 5y ago
Vertex skinning is a pain in GLES 2 because of uniform size limits, since there are no UBOs. You can only have so many bones before you overflow those limits and then basically the only option I can see is to start packing your bone matrices into a texture (and since it's GLES 2 it has to be RGBA 8-bit), which is pretty awful.
GLES 2 also has no unbounded loops in shaders, which makes some postprocessing effects like blurs a big pain to write (you need a separate shader for every blur radius). Granted, most drivers don't enforce this, since it's so obnoxious.
- flohofwoe 5y agoTBH, UBOs are quite useless in GLES3/WebGL2 (the guaranteed size is too small, and dynamically updating without sync issues isn't trivial because the under-the-hood details seems to be different in each GL implementation). If you really need to render lots of skinned characters, you'd use a single texture anyway for uploading the joint data of all characters (e.g. this demo renders hundreds of independently animated characters in a single drawcall in WebGL1): https://floooh.github.io/sokol-html5/ozz-skin-sapp.html https://floooh.github.io/sokol-html5/ozz-skin-sapp.html
- asiachick 5y agoWhy is putting bone matrices in a texture awful? Seems great to me.
- pcwalton 5y agoBecause you're packing unbounded floating point values into an 8-bit RGBA unorm texture. Yes, it can be done. Dealing with the issues is annoying, though.