Object & Clipping Plane Dithering Shaders

by Chad Hillary

Course Project for COMP3490: Computer Graphics 1


A GLSL Shader that fades objects as they approach the cliiping plane through 8x8 Bayer Matrix dithering.

In the "Object clipping" demo, the dither matrix's transparency threshold is compared to the object's model distance divided by the near plane distance. This results in a technique that would be interesting in third-person games, where objects may obstruct the view of the player model.

Object Clipping - Click here for Three.js Demo

In the "Fragment Clipping" demo, the dither matrix's transparency threshold is compared to the calculated distance of each object fragment divided by the near plane distance.

Fragment Clipping - Click here for Three.js Demo