Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In directx12 mesh shaders example,there is an error. #848

Open
zjugxy opened this issue Dec 5, 2023 · 1 comment
Open

In directx12 mesh shaders example,there is an error. #848

zjugxy opened this issue Dec 5, 2023 · 1 comment
Labels
bug tools PIX, etc.

Comments

@zjugxy
Copy link

zjugxy commented Dec 5, 2023

In MeshletGenerator/Generation.cpp, the meshletize template function.
After you enter the area of AddToMeshlet()==True , you refresh the candidate and remark the scores.
An error occur that there is a situation that is meshlet is not full but the candidate has been empty,(which often occurs in the seed triangle is in the clusters has been clustered), you ignore the situation and run
/*
if (candidates.empty())
{
while (triIndex < triCount && checklist[triIndex])
++triIndex;

        if (triIndex == triCount)
            break;

        candidates.push_back(std::make_pair(triIndex, 0.0f));
        candidateCheck.insert(triIndex);
    }

*/
so that the meshlet was added with a new seed triangle which is not adjcent to the meshlet.

so you have to change that line /* if (IsMeshletFull(maxVerts, maxPrims, *curr)) */
into if (IsMeshletFull(maxVerts, maxPrims, *curr)||candidate.empty())

@walbourn walbourn added the tools PIX, etc. label Mar 6, 2024
@walbourn
Copy link
Member

walbourn commented Mar 6, 2024

Thank you for the report. Please submit a PR to fix this and we can review it.

@walbourn walbourn added the bug label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tools PIX, etc.
Projects
None yet
Development

No branches or pull requests

2 participants