pex-gl / pex-context

Modern WebGL state wrapper for PEX: allocate GPU resources (textures, buffers), setup state pipelines and passes, and combine them into commands.
http://pex-gl.github.io/pex-context/
MIT License
160 stars 12 forks source link

Skip built-in attributes when building vertexLayout #142

Closed vorg closed 4 months ago

vorg commented 4 months ago

WebGL2 and ES300 have gl_VertexID and gl_InstanceID that get detected but our program code and expected to be present in attributes object.

Screenshot 2024-06-20 at 09 33 02

They should be skipped when detecting attribs using gl.getActiveAttrib

Similar issue here https://github.com/playcanvas/engine/pull/4695

Otherwise we get error when drawing Screenshot 2024-06-20 at 09 34 04