Shadows are a great way to relay information in a 3D rendering. They can help demonstrate distances between two objects such as a bouncing ball and the ground. They also relay further information to the structure of an object as they give a second silhouette from the perspective of the light casting the shadow. In this article, I will demonstrate a very small but important improvement for THREEjs’s shadow rendering, a one line change to the shader code.
Our Demolition Derby game is modular. Each module is a low polygon mesh, and a player assembles these modules to create a wheel-based vehicle. These vehicles are then used to combat other players’ vehicles in a simulated physics environment. Victory is determined by breaking apart the modules of the opponent’s vehicle before they yours.