Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

PlanarReflector-CPP

An asset by DanTrz
The page banner background of a mountain and forest
PlanarReflector-CPP hero image

Quick Information

0 ratings
PlanarReflector-CPP icon image
DanTrz
PlanarReflector-CPP

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 optionsCore 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 scenesReflection & 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

Supported Engine Version
4.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
9 days ago
Git URL
Issue URL

README icons_reflection Godot C++ Planar Reflection System

README Godot Engine README License: MIT README 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.

README 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 Main 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

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 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

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
PlanarReflector-CPP icon image
DanTrz
PlanarReflector-CPP

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 optionsCore 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 scenesReflection & 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

Supported Engine Version
4.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
9 days ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers