const float2 delta_10 = normalize(vertices[1].p.xy - vertices[0].p.xy);
const float2 delta_21 = normalize(vertices[2].p.xy - vertices[1].p.xy);
const float2 delta_02 = normalize(vertices[0].p.xy - vertices[2].p.xy);
// voxel space to NDC space
const float voxel_to_ndc = 2.0f * g_voxel_grid_inv_resolution;
// Move vertices for conservative rasterization.
vertices[0].p.xy = (vertices[0].p.xy + ? * normalize(delta_02 - delta_10)) * voxel_to_ndc;
vertices[1].p.xy = (vertices[1].p.xy + ? * normalize(delta_10 - delta_21)) * voxel_to_ndc;
vertices[2].p.xy = (vertices[2].p.xy + ? * normalize(delta_21 - delta_02)) * voxel_to_ndc;
The above snippet moves the vertices of a triangle outwards to obtain a larger triangle to rasterize (and to let the RS spawn fragments/jobs for voxelizing my scene in the PS).
I currently set ? to 1, though this still results in some holes along some of the edges of the mesh.
Any ideas, how to be more conservative (but not too conservative, as this will increase the number of fragments)?