Hi im really struggling to get info on how to tell a specific area of geometry not to draw. Basically for a project in looking at creating a hole in a wall via culling to stop a certain area being drawn. i cast a ray from the centre of the screen and i check to see if it has hit geometry e.g my wall model. When this happens i am trying to draw a shape which represents the area of the wall i want to cull. The problem is I have no idea how to tell the are contained within the shape not to draw to create the hole. Can anyone point me in the right direction ?
There are a few ways to do that. I'd be currently inclined to associated each fragment with a world position and issue a clip volume such as a sphere for each hole, calling clip/discard/kill if the fragments ends being in the sphere. Something similar has been done in Left Dead 2 if memory serves.
Messing with alpha maps might also be a possibility. It natively allows for a much higher hole count, I guess it'll also be much faster to render but the machinery required is fairly more involved.
In general, no, XNA/Direct3D does not feature natively this degree of control. You have to build it on top of the provided features.