I've very less knowledge when it comes to rasterization and typical rendering in games and other applications. So I was reading up on the rendering pipeline and found that the hardware could do early depth testing if you don't write to depth in fragment shader and this struck as odd to me. I'm having a hard time imagining cases where you'd wanna write to depth inside a fragment shader. In a normal rendering environment, the depth value gets calculated properly through all the transformations so why would you wanna mess with that? If anybody can explain briefly 2 or 3 examples it'd be great. Thanks.