mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
triangle fan support
This commit is contained in:
@@ -133,6 +133,7 @@ INST_NAME(general);
|
||||
#define MESH_OTHER 0 // this covers points and lines, logic is the same
|
||||
#define MESH_TRIANGLE_LIST 1
|
||||
#define MESH_TRIANGLE_STRIP 2
|
||||
#define MESH_TRIANGLE_FAN 3
|
||||
BINDING(0) uniform MeshPickUBOData
|
||||
{
|
||||
vec3 rayPos;
|
||||
|
||||
@@ -108,6 +108,14 @@ void trianglePath(uint threadID)
|
||||
idx2 = meshpick.use_indices != 0u ? ib.data[vertid+2] : vertid+2;
|
||||
break;
|
||||
}
|
||||
case MESH_TRIANGLE_FAN:
|
||||
{
|
||||
vertid *= 2;
|
||||
idx0 = meshpick.use_indices != 0u ? ib.data[0 ] : 0;
|
||||
idx1 = meshpick.use_indices != 0u ? ib.data[vertid ] : vertid;
|
||||
idx2 = meshpick.use_indices != 0u ? ib.data[vertid+1] : vertid+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vec4 pos0 = vb.data[idx0];
|
||||
|
||||
@@ -1092,10 +1092,16 @@ uint32_t GLReplay::PickVertex(uint32_t eventID, const MeshDisplay &cfg, uint32_t
|
||||
isTriangleMesh = true;
|
||||
break;
|
||||
};
|
||||
default:
|
||||
case eTopology_TriangleFan:
|
||||
{
|
||||
cdata->meshMode = MESH_TRIANGLE_FAN;
|
||||
isTriangleMesh = true;
|
||||
break;
|
||||
};
|
||||
// TODO: TriangleList_Adj, TriangleStrip_Adj
|
||||
default: // points, lines, patchlists
|
||||
{
|
||||
cdata->meshMode = MESH_OTHER;
|
||||
RDCWARN("Mesh type defaulting to screenspace point picking");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user