Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tolisz/ComputerGraphics_Duck

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duck with water simulation

duck_example.mp4

About project

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.

Navigation

LMB - camera rotation

RMB - camera zoom in/out

Compilation

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.

Windows

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

Linux

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

Used Libraries

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

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.