WebGL - Z-fighting in 3d
In this episode, I discuss z-fighting in WebGL and polygon offsets to fix it.
- 3d: Z-Fighting
- When two-primitives have the same / identical values in the z-buffer
- gl.POLYGONOFFSETFILL //Activates adding an offset to depth values of polygon's fragments.
- gl.polygonOffset //The offset is added before the depth test is performed and before the value is written into the depth buffer.