PlanarReflector-CPP 3D screenshot 1
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...

icons_reflection Godot C++ Planar Reflection System

Godot Engine License: MIT Version

A high-performance planar reflection system for Godot 4.4+ designed specifically for 3D pixel art games, but can be used in any game.

Reflection Demo

✨ 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

  1. Download the latest release code from Github
  2. Just copy the entire addons/ folder to your Godot res:// folder.
  3. If you already have a addons/ folder, all you need is to paste the PlanarReflectorCpp/ folder in there
  4. Enable the plugin in the Godot settings -> You might need to reload your project
  5. 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:

  1. Add the PlanarReflectorCpp node to your scene
  2. Add a PlanarMesh to it
  3. Add the provided BaseMaterial and BaseShader to it (see: addons/PlanarReflectorCpp/SupportFiles/)
  4. Make sure your objects are set the the Visibility Layer that matches the "Reflection layer" in the PlanarReflector
  5. Add custom enviroment (ideally without BG or BG COlor) and configure the PlanarReflector exported properties.
  6. Check that your lights are also in the correct layer and that your master Camera is assigned (and the Camera CullMasks match the layers)
  7. Run your game
  8. 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