You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is another thing that needs to be added to the list. WebGPU supports a stride of 0 for attributes. OpenGL ES does not. Stride of 0 in GL = advance the size of the attribute. Stride of 0 in WebGPU = a stride of 0 as in don't advance the attribute. Just keep reading the same value.
I guess in Compat a stride if 0 in an attribute would generate a validation error? Otherwise you could read value in the buffer, turn off the attribute (gl.disableVertexAttribPointer), and set the attribute's constant value (gl.vertexAttrib4f(...valueReadFromBuffer))
Instancing works fine and is tested in the test linked above. glVertexAttribDivisor sets how many instances you have to draw before the attribute advances and setting it to 0xffffffff means you'll never advance since that's also the maximum instance count.
* GT: already a solution. Set divisor of attribute to a giant number, and it works.
* KG: instance and non-instance values?
* CW: think we have tests for both. Remember writing tests for them.
* GT: I can double-check.
* Consensus. If it works, good - don't need to disallow.
I think this is another thing that needs to be added to the list. WebGPU supports a stride of 0 for attributes. OpenGL ES does not. Stride of 0 in GL = advance the size of the attribute. Stride of 0 in WebGPU = a stride of 0 as in don't advance the attribute. Just keep reading the same value.
I guess in Compat a stride if 0 in an attribute would generate a validation error? Otherwise you could read value in the buffer, turn off the attribute (gl.disableVertexAttribPointer), and set the attribute's constant value (gl.vertexAttrib4f(...valueReadFromBuffer))
Originally posted by @greggman in #4266 (comment)
The text was updated successfully, but these errors were encountered: