microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
6k stars 2.02k forks source link

Fix frustum top plane calculation #807

Closed gmodarelli closed 1 year ago

gmodarelli commented 1 year ago

Hello there, I've spotted a typo in the computation of the frustum top plane. I've briefly checked the other Mesh Shading samples and there are no bugs there.

Cheers :)

walbourn commented 1 year ago

Can you provide a description of how to repro the failure?

gmodarelli commented 1 year ago

Hey there, sorry I missed this message. Yes, I'll try to add a "Freeze Render" option so you can see how meshes outside of the top plane of the frustum are not culled.

Is it enough if I provide screenshots of this or would you like me to commit the code as well?

stanard commented 1 year ago

I already merged this change. Coincidentally, we found the same bug in a branch of MiniEngine and already fixed it with the same change. There is symmetry with each of the opposing planes (add/subtract), and by inspection, you can see that there was a typo on one of the planes.

walbourn commented 1 year ago

We ported this fix to the ATG samples copy as well and were able to repro the original issue to verify the fix. Looks good.