← All resources

Unity GitHub - BoatAttack Demo PlanarReflection.cs

Auto-discovered

Library / Codebase Intermediate

Unity

Visit resource ↗

Description

PlanarReflections.cs is in Unity BoatAttack under com.verasl.water-system. The MonoBehaviour drives real-time planar reflections for the sample URP water.

On beginCameraRendering it mirrors the main camera with a hidden secondary camera, reflects across a target plane, and clips via oblique projection. Settings cover resolution scale, layers, clip offset, and shadows; render targets respect URP scale and HDR formats.

Intermediate URP developers use it when integrating custom mirror passes with ScriptableRenderContext and global _PlanarReflectionTexture binding.

The GitHub source exposes a BeginPlanarReflections hook before RenderSingleCamera and temporarily adjusts fog, LOD, culling, and _PLANAR_REFLECTION_CAMERA.

BoatAttack is a common outdoor URP reference; this file links renderer callbacks to Verasl water materials.