-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
The current brush system doesn't have indices for the vertices calculated to represent displacements.
This is because displacements have a consistent pattern.
Meaning instanced draw calls & triangle strips are a potential optimisation available in this case.
However, this would require tracking the power of stored displacements and utilities.render.manager.find_gaps using this info to keep displacements of similar powers together.
Using a tesselation shader and uniform buffer to shape displacements would be a further optimisation, but adds a lot of complexity. (probably a very bad idea then)
it'd be crazy clever to store only the pattern of a power 2 and a power 3, then use some draw call magic to offset the indices to the start of each displacement in the vertex buffer, but that's also very complex and would likely take many months to work out, if it is at all possible.
For now, the index buffer entry for each displacement must be calculated at when organsing buffer writes (render.manager.add_brushes).