Semantics of ""

I have a BufferGeometry with X vertices indexed by Y triangles. shows Y triangles and Y / 3 vertices. Is this true, is everything just simply rendered with triangle soups?

1 Like

No, indexed geometries are rendered via gl.drawElements. The vertices property of shows in this case the amount of processed indices.

Isn’t it redundant? If it logs A and B and B = A/3, there may be no need to log it?

What am i missing, how is this number relevant?

Um, the problem is that should always reflect the vertex count of a geometry. But in the case of an indexed geometry, it’s the amount of processed indices. So yeah, right now the information in are somewhat redundant.

IMO, there are two options to make things more consistent:

  • Remove vertices
  • Ensure, indexed geometries write their vertex count to vertices

I vote for B. And noting it somewhere. I stumbled upon this and gave up half way after a few “no it doesnt work” “yes it does” :smiley:

1 Like

I’ve actually changed my mind, maybe for now removing vertices might make more sense. It doesn’t look trivial to add the actual vertex count, while this number is misleading.

Yeah, i’ve looked into the code too and we need a considerable amount of refactoring to implement a “non-hacky” solution :sweat_smile:

1 Like

Well, aparently it’s even more complicated, and the whole discussion melted my mind. I think im going to log the counts that im interested in, manually, and pretend that never existed :laughing:

1 Like

Just for the sake of completeness: The structure of has changed with the following PRs: and

With R91, three.js reports now the amount of rendered primitives: triangles, points and lines. vertices has been removed.