Log inGet started
Package

LakeMirror.component

Newest version

README.md

LakeMirror

A true mirror reflection for a flat lake whose water plane is y = 0 (Lantern Drift's lake). In play, each frame it puts a camera at the mirror image of whichever camera is drawing the screen, reflected through the water plane, with the same field of view. That camera renders the scene without the water into a texture at scale of the viewport's size. The component then hands the texture to the lake's tidewater waterSurface material as planar_map, with planar_strength 1, so the surface reflects it in place of the screen-space trace.

Put it on any entity in the scene; it needs no sibling components. waterName names the WaterBody entity; its whole tree is put on the water render layer so the mirror camera skips it. Removing the component sets the strength back to 0, frees the texture and despawns the camera. It does nothing in edit mode.