I built the prefab system primarily for our level designers, allowing them to compose buildings from modular parts created by the art team and place them freely across our large, building-dense scenes. Alongside this, I added a color picker that feeds directly into the shader, dynamically tinting wall textures at runtime — giving the city visual variety without requiring the artists to author multiple texture variants.
As the game world grew larger, the limits of our shadow map became visible at distance, so I implemented cascaded shadow maps, blending between cascades in the shader to maintain consistent shadow coverage across the full scene.
With many prefab instances populating the levels, rendering each object individually was costly, so I introduced instanced batching for all objects sharing the same shaders — including the default vertex and pixel shaders used by the majority of scene objects — significantly reducing draw call overhead.
To further cut rendering costs, I optimized the render logic by eliminating redundant dynamic casts that were being performed three times per object per frame, and extended the frustum culler to run more efficiently and support orthographic projections, allowing it to be reused for shadow map culling as well.