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
Right now the compute rasterizer only supports a simple list of triangles. It would be a good exercise to add support for an index buffer to support more complex models without using too much memory. You'll need to:
Create another buffer, similar to the vertex buffer, that holds indices into the vertex buffer, and send that to the compute shader
Change how many times the compute dispatches to number of indices / 3
In the shader, get the triangle v1, v2, v3 by getting the next 3 indices and fetching them from the vertex buffer
Change src/loadModel.js to return a vertex buffer and an index buffer
The text was updated successfully, but these errors were encountered:
Right now the compute rasterizer only supports a simple list of triangles. It would be a good exercise to add support for an index buffer to support more complex models without using too much memory. You'll need to:
src/loadModel.js
to return a vertex buffer and an index bufferThe text was updated successfully, but these errors were encountered: