
D
Publisher
dantrz
PlanarReflector-CPP 3D
3D
Reflection C++ Performance PixelArt Rendering SubViewport GDExtension Filtering
A high-performance planar reflection system for Godot 4.4+ written in C++ with GDExtension, designed for performance with some nice quality of life configuration options Core Functionality -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 envir...
Godot C++ Planar Reflection System
A high-performance planar reflection system for Godot 4.4+ designed specifically for 3D pixel art games, but can be used in any game.
✨ Features
🎯 Core Functionality
- 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
🎮 Reflection & Performance Features
- 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
🚀 Installation
Method 1: Manual Installation
- 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
Method 2: AssetLib (WiP - coming soon)
🎮 General usage:
- 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 master 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)
🔧 Technical Constraints
- Planar surfaces only - Works best with flat surfaces
- No "below surface" object filtering - It will show reflection of "underwater" elements for example. To workaround this, use cull-masks to ignore these objects.
- Requires Plugin enabled for editor - To see reflections in the Editor the plugin must be active