티스토리 뷰

mesh shader와 같이 이미고려된 구조가 아니면

index buffer 없으면 렌더 시간이 2배정도 느려짐;

    // encode meshlet_index with basevertarb 
    uint meshlet_index = gl_BaseVertexARB;
    uint index = gl_VertexIndex - gl_BaseVertexARB;

    uint vertex_index = uint(meshletdatas[meshlet_index].indices[index]);
    uint vertex_id = meshletdatas[meshlet_index].vertices[vertex_index];
    uint global_vertex_id = draw.vertex_offset + vertex_id;

meshlet 구조를 위와같이 역산을 하든;

단순히 index buffer를 ssbo 로 전달해도 유사한듯

1) In any case, indexing is free operation at GPU side, you don't take penalties there. (added) Of course, indices are random access operations, and can hurt GPU memory cache performance.

2) Indexing may allow GPU vertex cache to make those few optimizations for overlapping vertices.

https://gamedev.stackexchange.com/questions/110244/is-index-drawing-faster-than-non-index-drawing

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크