/Glossy

Real-time pathtracer in GLSL

Primary LanguageC++MIT LicenseMIT

Glossy

A rudimentary and simplistic pathtracer written in GLSL. It runs entirely inside the fragment shader.

Screenshot

Screenshot

Make sure to check out the examples in the scenes/ subdirectory. To launch one, simply enter ./Glossy ./scenes/three_lights.json.

Features

  • All calculations are done on the graphics cards
  • Configurable scene files in JSON
  • Diffuse and specular lighting
  • Recursive pathtracing

Where are the .frag files?

There are none. The GLSL fragment shader code is actually being generated at run-time based on the given JSON scene file. Check out json2glsl.cpp if you're interested.

Dependencies

  • SFML for the OS dependent window and OpenGL code.
  • nlohmann/json for parsing JSON files.

License

Glossy is licensed under the MIT License. See the enclosed LICENSE.txt for more information.