Skip to content

This personal project serves as both a learning tool for Vulkan and an exploration of software architecture in graphics programming.

License

Notifications You must be signed in to change notification settings

Loxodromics/LillUgsi

Repository files navigation

Lill Ugsi: Vulkan Learning Render

Rather than following yet another Vulkan beginner's tutorial, I asked Claude to take me by the hand as we build a Vulkan renderer together. This project focuses on improving my graphics programming skills rather than creating a finished product. While primarily meant for my personal learning, the code is well-commented, so others might find it useful as well.

ScreenShot Version 0.2

Notes

This is a personal learning project that I'm sharing for educational purposes. While I welcome others to learn from, use, and adapt this code (under the MIT License), I am not actively seeking contributions. The repository is provided as-is, primarily as a reference for others interested in learning Vulkan and graphics programming.

Further, as mentioned right at the beginning, this project contains lots of AI generated code. Do whatever you like with this information.

Motivation

  1. Learning: Gain hands-on experience with Vulkan and understand the principles of modern graphics programming.
  2. Best Practices: Implement software engineering best practices in a complex, performance-critical application. This includes modular design, RAII (Resource Acquisition Is Initialization), and effective error handling.
  3. Graphics Techniques: Progressively implement and understand various graphics techniques, from basic rendering to advanced effects like physically-based rendering and global illumination.
  4. Performance Optimization: Learn to optimize graphics applications, understanding the intricacies of GPU utilization and memory management.
  5. Cross-Platform Development: Create a renderer that works on multiple platforms (focusing on macOS and Linux).

Key Features

  • Vulkan-based rendering pipeline
  • Modular, extensible architecture
  • Progressive implementation of graphics techniques
  • Focus on learning and best practices rather than rapid development

Development Approach

Follow the principle: "make it work, make it right, make it fast" See

The project will start with basic Vulkan initialization and simple rendering, gradually adding complexity. Each stage will build upon the previous, ensuring a working renderer that continuously improves. The development process will emphasize understanding each component thoroughly before moving to more advanced topics. This project serves as both a learning tool for Vulkan and an exploration of software architecture in graphics programming. It aims to balance theoretical understanding with practical implementation, providing a solid foundation for further graphics programming endeavors.

Tools and Libraries

  • Vulkan SDK
  • SDL3 for window management and input
  • GLM for mathematics
  • spdlog for logging
  • CMake and Conan for build management and dependency handling

Getting Started

Prerequisites

  • CMake 3.24 or higher
  • Vulkan SDK 1.3.216 or higher, I guess 🤷‍♀️
  • Modern C++ compiler with C++17 support
  • SDL3
  • Conan package manager

Building

  1. Clone the repository

  2. Create a build directory:

mkdir build
cd build
  1. Install dependencies using Conan:
conan install .. --output-folder=. --build=missing
  1. Configure and build with CMake:
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
cmake --build .

Running

After successful compilation, you can run the application:

./LillUgsi

The application will open a window displaying a demo scene with multiple cubes and dynamic lighting.

Controls

  • Right Mouse Button + Mouse Move: Rotate camera
  • WASD: Move camera forward/left/backward/right
  • QE: Move camera down/up

Common Issues

  • Make sure to set Vulkan_DIR in CMakeLists.txt to your Vulkan SDK path
  • If building fails, check that all dependencies are properly installed and your compiler supports C++17

Coding Style Guidelines

  • Use CamelCase for methods and variables, use PascalCase for classes (classes start with a capital letter, variables and methods don't)
  • Use all lowercase letters for filenames without underscores or hyphens
  • Follow more or less the Qt's coding style guidelines, but access all members (variables and methods) via this-> instead of prefixing them with m_
  • Use "pointer-to-type" style
  • Place implementation (.cpp) and header (.h) files next to each other in the src directory
  • Use three slashes (///) for comments to differentiate from commented code
  • Use tabs for indentation (4 spaces)
  • Prioritize documenting the 'why' rather than the 'what' in comments. Comments explain the rationale behind each step. Comments are written saying 'we' instead of 'I' or passive voice
  • Use descriptive names for classes, variables, and functions
  • Use const for variables and methods where possible
  • Write modern C++ code with [[nodiscard]] and such modern C++ features

About

This personal project serves as both a learning tool for Vulkan and an exploration of software architecture in graphics programming.

Topics

Resources

License

Stars

Watchers

Forks