{"id":23911900,"url":"https://github.com/tolisz/computergraphics_duck","last_synced_at":"2026-05-11T16:01:51.076Z","repository":{"id":271029827,"uuid":"912005275","full_name":"Tolisz/ComputerGraphics_Duck","owner":"Tolisz","description":"Duck with water simulation","archived":false,"fork":false,"pushed_at":"2025-01-04T22:07:48.000Z","size":16770,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T23:03:35.489Z","etag":null,"topics":["billboard","computer-graphics","cpp20","duck","opengl","phong-model","simulation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tolisz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-04T12:49:05.000Z","updated_at":"2025-01-04T22:32:57.000Z","dependencies_parsed_at":"2025-01-04T23:28:31.097Z","dependency_job_id":null,"html_url":"https://github.com/Tolisz/ComputerGraphics_Duck","commit_stats":null,"previous_names":["tolisz/computergraphics_duck"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Tolisz/ComputerGraphics_Duck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FComputerGraphics_Duck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FComputerGraphics_Duck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FComputerGraphics_Duck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FComputerGraphics_Duck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tolisz","download_url":"https://codeload.github.com/Tolisz/ComputerGraphics_Duck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FComputerGraphics_Duck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32902254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["billboard","computer-graphics","cpp20","duck","opengl","phong-model","simulation"],"created_at":"2025-01-05T08:32:16.193Z","updated_at":"2026-05-11T16:01:51.053Z","avatar_url":"https://github.com/Tolisz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Duck with water simulation\r\n\r\nhttps://github.com/user-attachments/assets/4b0f687f-7954-4b4c-8f58-837c8ca44590\r\n\r\n## About project \r\n\r\nThis 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*. \r\n\r\nProject features: \r\n\r\n- The duck moves along segments of B-spline.\r\n- Custom procedurally generated billboards are used to represent point lights on the scene.\r\n- The scene is lit using the Phong model.\r\n- Compute shaders are used for water simulation and respective computation of water surface normal vectors.\r\n- Snell's window effect when looking from under the water. \r\n\r\n## Navigation \r\n\r\n\u003ckbd\u003eLMB\u003c/kbd\u003e - camera rotation\r\n\r\n\u003ckbd\u003eRMB\u003c/kbd\u003e - camera zoom in/out\r\n\r\n## Compilation \r\n\r\nThe project is written in C++ (OpenGL) using CMake as a build system. It has two configuration CMake options: \r\n\r\n| Option | Description | \r\n| :---:         |     :---      |\r\n| `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.      |\r\n| `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.        |\r\n\r\n### Windows \r\n\r\nAll subsequent commands should be called from Windows Power Shell.\r\n\r\n```\r\ngit clone --recurse-submodules -j8 https://github.com/Tolisz/ComputerGraphics_Duck.git\r\ncd ComputerGraphics_Duck\r\ncmake -S . -B build -DDUCK_EMBEDDED_SHADERS=ON -DDUCK_SHOW_DEBUG_CONSOLE=OFF\r\ncmake --build build --config Release\r\n```\r\n\r\n```\r\n.\\build\\Release\\duck.exe\r\n```\r\n\r\n### Linux\r\n\r\nAll subsequent commands should be called from terminal. Compilation was checked using g++ (version 11.4.0) and clang++ (version 14.0.0) compilers.\r\n\r\n```\r\ngit clone --recurse-submodules -j8 https://github.com/Tolisz/ComputerGraphics_Duck.git\r\ncd ComputerGraphics_Duck\r\ncmake -S . -B build -DDUCK_EMBEDDED_SHADERS=ON -DDUCK_SHOW_DEBUG_CONSOLE=OFF\r\ncmake --build build --config Release -j 26\r\n```\r\n\r\n```\r\n./build/duck\r\n```\r\n\r\n## Used Libraries\r\n\r\nLibraries `GLFW`, `GLM`, `STB` and `ImGui` are used as submodules located in `externals` directory. `GLAD` is used as a generated file from [glad](https://glad.dav1d.de/) web page. \r\n\r\n| Library | Licence |\r\n| :---:   | :---:   |\r\n| [GLFW](https://github.com/glfw/glfw) | [Zlib](https://github.com/glfw/glfw?tab=Zlib-1-ov-file#readme) |\r\n| [GLM](https://github.com/g-truc/glm) | [Modified MIT](https://github.com/g-truc/glm?tab=License-1-ov-file#readme)|\r\n| [ImGui](https://github.com/ocornut/imgui) | [MIT](https://github.com/ocornut/imgui?tab=MIT-1-ov-file#readme)| \r\n| [GLAD](https://github.com/Dav1dde/glad) | [MIT](https://github.com/Dav1dde/glad?tab=License-1-ov-file#readme) | \r\n| [STB](https://github.com/nothings/stb) | [Modified MIT](https://github.com/nothings/stb?tab=License-1-ov-file#readme) | \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolisz%2Fcomputergraphics_duck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolisz%2Fcomputergraphics_duck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolisz%2Fcomputergraphics_duck/lists"}