How to make selected polygons on the first image - invisible ?
Turned on DepthTest on the second imgae. It allowed me to make selected polygons invisible, but other polygons are chopped.
DepthTest
Moderator: Moderators
Re: DepthTest
Z-fight ? try to decrease the distance to the camera of your polygons, or just move them up
Re: DepthTest
Exactly, the z-buffer is not accurate enough, or your polygons are simply too close to the ground.
Re: DepthTest
Here it has nothing to do with accuracy, the `roads` polygons have a different surface than the terrain. Either use PolygonOffset or use stencil shader tricks.
- danil_kalina
- Posts: 505
- Joined: 08 Feb 2010, 22:21
Re: DepthTest
Re: DepthTest
You got an empty cylinder, this form has max 4 polygon overlaps/overdraw. In contrast boxes, cylinders, spheres, ... have only 2.
So the depending on your form/overlapping you need to decide how many stencil bits you use. Minimap etc. only need 1bit (=2 states), you need in contrast 4 states = 2bits. Just change the number of used stencil bits and it should work :)
So the depending on your form/overlapping you need to decide how many stencil bits you use. Minimap etc. only need 1bit (=2 states), you need in contrast 4 states = 2bits. Just change the number of used stencil bits and it should work :)
- danil_kalina
- Posts: 505
- Joined: 08 Feb 2010, 22:21
Re: DepthTest
Thanks JK, I didn't understand much with bits, but I fixed my circles. I need two convex cylinders for that