Skip to content

RoundedGlint585/ScreenSpaceReflection

Repository files navigation

Screen space reflection

This code repository is an implementation of screen space reflection technique on modern OpenGL;

Platforms

  • Linux
  • Win

Requirements

These are the base requirements to build

  • Cmake
  • A C++17-standard-compliant compiler
  • GLFW3
  • OpenGL4 or higher support
  • GLM

Installing

   chmod u+x build.sh
   ./build.sh

How to use

After code compilation, there will be "bin" folder, executive file in this folder as well as all textures, shaders and objects

To run code just run binary file

Current solution based on ImGUI library(they are amazing).

Key Purpose Default Value
Enable SSR Turn on/off reflections True
Distance bias Distance difference from which we will think that there is intersection 0.03
rayStep Step length + coefficient for adaptive step 0.1
Iteration count Amount of steps in ray marching 100
Enable exp step Enabling exponential step for marching False
Enable adaptive step Enabling step that should improve quality True
Enable binary step Enabling binary step, should be a bit better than adaptive False
Enable sampling Enabling additional sampling to improve quality False
Sample Count Amount of additional rays(shows only with enabled sampling). Computational heavy 4
Sampling coefficient Factor to addition to base direction(smaller closer to initial ray) 0.001
Debug draw Enabling debug draw to show reflection position False
Reload SSR Reloading shader in runtime

So just start program with these keys

Examples

[Reflection example]

[Full app]

Authors

  • Daniil Smolyakov - Initial work - DanonOfficial
  • Lcbx - binary step and debug draw - Lcbx

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Screen space reflections as easy as possible

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published