Skip to content

A ray-tracer for me to experiment with computer graphics

License

Notifications You must be signed in to change notification settings

Mich-Dich/gluttony_old

Repository files navigation

Gluttony - Vulkan Renderer Migration Branch

BVH_demo

This branch is dedicated to the ongoing migration of the project's rendering backend from OpenGL to Vulkan. This is a significant architectural change aimed at improving performance, offering more control over the rendering pipeline, and leveraging modern GPU capabilities.

Current Status

The transition to Vulkan is actively in progress. Key components of the rendering system are being re-implemented using the Vulkan API.

Implemented Features (Vulkan)

  • Image Management:
    • Loading and allocation of images (textures) using Vulkan.
    • Support for various image formats (RGBA, RGBA32F).
    • Handling of mipmaps for images.
    • Image transitions between different layouts (e.g., VK_IMAGE_LAYOUT_UNDEFINED to VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL).
    • Descriptor set generation for images to be used in shaders.
  • Material System:
    • Basic material pipeline creation for opaque and transparent objects.
    • Shader module loading for vertex and fragment shaders.
    • Descriptor set layout and pipeline layout creation for materials.
    • Integration with the global descriptor allocator for material instances.
  • Core Renderer Integration:
    • Buffer creation and data transfer to the GPU.
    • Immediate command buffer submission for rendering operations.
    • Resource release mechanism for Vulkan objects (images, image views, allocations).

Work in Progress / Upcoming Features

  • Full Scene Rendering: Integrating the new Vulkan-based material system with the main rendering loop.
  • Advanced Material Properties: Expanding material capabilities beyond basic color and metallic-roughness.
  • Debugging Tools: Enhancing debug visualization with Vulkan-specific tools.
  • Performance Optimization: Fine-tuning Vulkan usage for optimal performance.
  • Error Handling and Validation: Strengthening error handling and leveraging Vulkan validation layers.

Why Vulkan?

The decision to switch to Vulkan was driven by several key advantages:

  • Explicit Control: Vulkan provides direct control over GPU operations, allowing for highly optimized rendering pipelines.
  • Modern API: Designed for modern hardware and multi-core CPUs, enabling better CPU utilization.
  • Cross-Platform: Offers a robust cross-platform solution for high-performance graphics.
  • Reduced Driver Overhead: Less abstraction leads to lower CPU overhead and more predictable performance.
  • Advanced Features: Access to cutting-edge rendering techniques and features not available or cumbersome in older APIs.

Contributing

Contributions to this migration effort are highly welcome! If you're familiar with Vulkan and interested in helping, please refer to the main project's CONTRIBUTING.md and feel free to open issues or pull requests on this branch.

Feedback

We appreciate any feedback on the Vulkan implementation, performance, or any issues encountered. Please report them via the issue tracker.

About

A ray-tracer for me to experiment with computer graphics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published