duck_example.mp4
This is one of the projects created during "Computer Graphics 2" course, specialty CAD/CAM systems design of degree in Computer Science and Information Systems at Warsaw University of Technology.
Project features:
- The duck moves along segments of B-spline.
- Custom procedurally generated billboards are used to represent point lights on the scene.
- The scene is lit using the Phong model.
- Compute shaders are used for water simulation and respective computation of water surface normal vectors.
- Snell's window effect when looking from under the water.
LMB - camera rotation
RMB - camera zoom in/out
The project is written in C++ (OpenGL) using CMake as a build system. It has two configuration CMake options:
Option | Description |
---|---|
DUCK_EMBEDDED_SHADERS |
If ON shader code will be embedded into a resulting app's binary. If OFF shader code will be read from shaders directory, so a binary has to be run from repository root directory. |
DUCK_SHOW_DEBUG_CONSOLE |
If ON - beside app's window - a debug console will be shown on app start up. If OFF only app's window will be shown. |
All subsequent commands should be called from Windows Power Shell.
git clone --recurse-submodules -j8 https://github.com/Tolisz/ComputerGraphics_Duck.git
cd ComputerGraphics_Duck
cmake -S . -B build -DDUCK_EMBEDDED_SHADERS=ON -DDUCK_SHOW_DEBUG_CONSOLE=OFF
cmake --build build --config Release
.\build\Release\duck.exe
All subsequent commands should be called from terminal. Compilation was checked using g++ (version 11.4.0) and clang++ (version 14.0.0) compilers.
git clone --recurse-submodules -j8 https://github.com/Tolisz/ComputerGraphics_Duck.git
cd ComputerGraphics_Duck
cmake -S . -B build -DDUCK_EMBEDDED_SHADERS=ON -DDUCK_SHOW_DEBUG_CONSOLE=OFF
cmake --build build --config Release -j 26
./build/duck
Libraries GLFW
, GLM
, STB
and ImGui
are used as submodules located in externals
directory. GLAD
is used as a generated file from glad web page.
Library | Licence |
---|---|
GLFW | Zlib |
GLM | Modified MIT |
ImGui | MIT |
GLAD | MIT |
STB | Modified MIT |