Skip to content

HLSL build-in triangle object instead of the Triangle struct ? #15

@Cewein

Description

@Cewein

There is a build in triangle object in HLSL.

Would it be faster than using the created struct? it look like the triangle object is just a array of 3 float3 and could save the need of this loop :

for (int i = 0; i < numTris; i++) {
     for (int j = 0; j < 3; j++) {
         meshTriangles[i * 3 + j] = i * 3 + j;
         vertices[i * 3 + j] = tris[i][j];
     }
 }

I'm not 100% sure of the loop removal opportunity but might be worth investigating

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions