In my game I have a billiard table, and a floor below the table. In typical situation the table covers 80% of the screen, so only small amount of the floor is visible. And I render the table first, so invisible part of the floor is discarded by the depth buffer test.
But profiling with Nsight shows me drawing the floor takes significant amount of time, and it is spent in the rasterizer. It seems generating all those pixels of the floor and depth testing them takes a long time.
I'm wondering how to solve this problem and one thing I tried is to divide the floor (a rectangle with two triangles) to multiple rectangles, so some of them could be cancelled in an earlier stage. The problem is, this is still one model / mesh, just with more triangles and I don't know how to start.
What would be a way to achieve this in Monogame + HLSL? Somewhere in vertex shader? Or gemoetry shader (is it supported in monogame?)
Or is there any other way to optimize this?
UPDATE: the whole floor is needed and might be drawn depending on where the camera is, so I can't get rid of parts of it. In typical situations table top covers 80% of the screen because of perspective and looking down at an angle. The game is in 3D.