I'm implementing kind of 3D Model tools using DirectX 11 and I need to paint the collision area between 2 meshes with Pixel-level accuracy.
So I think I should do something in pixel shader but I don't have enough experience with shader programming.
here is my approximate solution and I'm not sure if it will work or not and whether it's effective or not.
first model is passed to the shader through inputlayout.
second model is passed to the shader through structuredbuffer.
when pixel shader draw first model, calculate collision algorithm in pixel shader
if it is true paint it red.
UAV is not required because there is no output from shader. it is used in pixel shader only.
is there any other good way? this solution have to check with all triangles in second model at every pixel.
I know there is the compute shader, but I've never use it before. if it is necessary, I will take this opportunity to study.