4 ms·
About the #1 WebGL complaint, is it really so that you can't use integers in attributes? https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.8 https:/
by fulafel 5y ago
About the #1 WebGL complaint, is it really so that you can't use integers in attributes?
https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.8 https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7... seems to say otherwise, and also https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer https://developer.mozilla.org/en-US/docs/Web/API/WebGL2Rende... tells you can use integer types including gl.INT, gl.SHORT etc, and here's someone using int32 textures successfully: https://stackoverflow.com/questions/43905968/how-to-get-32-bit-integer-texture-working-in-webgl-2-0 https://stackoverflow.com/questions/43905968/how-to-get-32-b...
- kylebarron 5y agoProbably supported only in WebGL2
- krona 5y agoThere is no requirement for integer arithmetic in WebGL 1; all numbers are essentially floats, even if the attribute is not float. Integer support is GLSL ES 3.0 (the shader language) i.e. WebGL2.
- fulafel 5y agoIntentionally talking about about the years obsolete WebGL 1 feature set as "WebGL" while proposing WebGPU would be pretty iffy. If the issue is that WebGL 2, an incremental update to WebGL 1, doesn't have 100% user coverage after 4.5 years, WebGPU is going to be much farther off as it's not even fully specced yet. But since the article didn't say anything about webgl versions, it seems more likely that the author was just unaware.