A high-performance planar reflection system for Godot 4.4+ designed specifically for 3D pixel art games, but can be used in any game.
- Real-time planar reflections with geometric accuracy
- Very performant written in C++ via GDExtensions
- Pixel art optimized - Works perfectly with SubViewport downscaling
- Dual rendering system - Separate game and editor modes
- Layer-based filtering - Control what objects appear in reflections
- Custom environments - Independent lighting for reflected scenes
- **Version 1.0.1 brings Compositor Effect to hide/mask objects intersecting with PlanarReflector (like underwater objects).
- **C++ version Binaries available for MacOS, Windows and Linux. (GDScript version also included, but required adding Script to a MeshInstance3D manually)
- Camera mode detection - Automatic perspective/orthographic handling
- Reflection offset system - Fine-tune reflection positioning
- LOD (Level of Detail) - Distance-based performance optimization
- Update frequency control - Balance quality vs performance
- Movement threshold detection - Only update when camera moves
- Configurable reflection layers - You can define what Visibility Layers get reflection
- Cached calculations - Minimize redundant computations
- Download the latest release code from Github
- Just copy the entire
addons/folder to your Godot res:// folder. - If you already have a
addons/folder, all you need is to paste thePlanarReflectorCpp/folder in there - Enable the plugin in the Godot settings -> You might need to reload your project
- You can download/Clone the entire Git Repo that comes with a DemoScene to see the base configuration applied
- Add the PlanarReflectorCpp node to your scene
- Add a PlanarMesh to it
- Add the provided BaseMaterial and BaseShader to it (see: addons/PlanarReflectorCpp/SupportFiles/)
- Make sure your objects are set the the Visibility Layer that matches the "Reflection layer" in the PlanarReflector
- Add custom enviroment (ideally without BG or BG COlor) and configure the PlanarReflector exported properties.
- Check that your lights are also in the correct layer and that your Main Camera is assigned (and the Camera CullMasks match the layers)
- Run your game
- To see reflections working in the editor, make sure you enable the plugin and "click" in the 3D scene, selecting the planar node in the scene (will refresh it)
- Planar surfaces only - Works best with flat surfaces
- **Hide objects intersecting with Planar Reflector is EXPERIMENTAL (Alpha stage) working with Compositor Effects. This means you can now hide underwater objects, for example. When available, I will update to the new solution explained here:#1
- Requires Plugin enabled for editor - To see reflections in the Editor the plugin must be active
Full CPP Code here: https://github.com/DanTrz/PlanarReflector-GDExtension-FullCPPProject

