BabylonJS/Spector.js

Triangle Count is actually Indices Count

Squareys opened this issue · 5 comments

Hi all,

I just got a report that rendering two planes (two triangles each) produces the following statistics in Spector.js:
image

It seems that in

private appendToPrimitives(primitives: IPrimitivesCount, mode: number, count: number): void {

The count is forwarded as-is to the primitive counts, but every call to this function will just forward the "count" argument, e.g. of glDrawArrays, which is actually the index count.

Solution would be to divide the count by primitive size everywhere.

Best,
Jonathan

It is actually by design and I can not emphasize enough how I am not good with UX :-)

I wanted to mainly reference here the number of vertices in use more than the actual number of triangles lines and such. The primitives titles might be not adequate then I do totally agree.

Do you think I should add in parenthesis after Primtives (vertices count) ?

Maybe make the title of the list "Vertex Counts" (or Index Counts) rather than "Primitives"? I think that could avoid the confusion 👍

Do you know if this fix will be available for the Firefox add-on? The Firefox store says the add-on was last updated on Jan 4th, 2021 so I don't know how to get this update working.

You are totally right :-( I will update both chromium and mozilla assets as soon as I can (should be done by next week max if the process did not change too much)

Both Chrome and Firefox are in verification process as we speak :-)