Occlusion Mask
Camera System

Camera ShaderIsometricDot ProductUnreal Engine 5

A dot product–based angle calculation shader that guarantees the player character is always visible in a fixed isometric environment — solving the classic wall-occlusion problem without toggling geometry.

Add screenshot or GIF here

Add image caption here

The wall-in-the-way problem

In isometric games with fixed cameras, walls and ceilings frequently obscure the player character. Standard solutions — hiding geometry, toggling actors — are brittle and costly. I wanted a shader-based solution that was automatic, smooth, and required no per-object setup on level geometry.

Technical breakdown

  • Dot product angle detection — calculates the angle between the camera forward vector and each surface normal; surfaces facing the camera beyond a threshold trigger the mask
  • Occlusion mask material — masked surfaces render as transparent or silhouetted without modifying the mesh or actor blueprint
  • Fixed isometric constraint — solution designed specifically for locked-camera environments where view angle is constant, allowing the threshold to be pre-tuned
  • Character always visible — player silhouette renders through occluding geometry, maintaining spatial awareness at all times

What this taught me

This was the most mathematically grounded shader I built during the jam. Working with dot products in material graphs rather than code required me to think visually about vector math — a skill that I want to develop further in a research context.

Research Question

Can dot product–based occlusion masking be generalised into a dynamic-camera solution, and what are the limits of shader-only approaches to spatial visibility problems in real-time engines?