YuliNet / raytracing-opengl

realtime ray tracing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Realtime raytracing

Implemented with OpenGL fragment shaders.

Scene setup in main.cpp source file.

Features

Contains following geometric primititives:

  • Sphere
  • Box
  • Ring
  • Plane
  • Torus
  • Quadric surfaces:
    • Ellipsoid
    • Cone
    • Cylinder
    • Elliptic paraboloid
    • Hyperbolic paraboloid
    • Elliptic hyperboloid

Also:

  • SMAA antialiasing
  • Texturing for sphere, box, ring
  • Cubemaps
  • Rotations with quaternions

Controls:

Rotate camera with mouse

Movement:

  • WASD
  • Space - up
  • Ctrl - down
  • Shift (hold) - boost
  • Alt (hold) - slowdown

Requirements

  • CMake (>= 3.0.2)
  • GPU with OpenGL (>= 3.3) support
  • GLM (included)
  • GLFW, should be automatically found by CMake (win64 binaries included)

Build

mkdir bin
cd bin
cmake ..
cmake --build .

GLFW for linux:

sudo apt install libglfw3-dev

GLFW for windows:

GLFW binaries included (common/GLFW), glfw3.lib compiled for Visual Studio 2019

You can use binaries for other VS versions from GLFW/win-x64 directory, or compile by yourself.

Screenshots

About

realtime ray tracing

License:MIT License


Languages

Language:C 50.2%Language:C++ 49.0%Language:GLSL 0.6%Language:CMake 0.2%