Git Product home page Git Product logo

caldera's Introduction

caldera

Vulkan and rust experiments. The code is split into a core caldera crate and a few different examples. Everything is work in progress and unstable, but this repository is public in case the code is interesting for others.

Features

  • Render graph implementation over Vulkan, featuring:
    • Automatic memory allocation of temporary buffers and images
    • Automatic placement of barriers and layout transitions
  • Makes use of spark to manage Vulkan commands and extensions
  • Live reload of shaders (not ray tracing pipeline shaders yet though)
  • A procedural macro for descriptor set layouts
  • Asynchronous loading of resources using rust async/.await

Examples

Examples can be run as follows:

make && cargo run --example <example_name> -- --help

The call to make is required to build shaders, which depends on glslangValidator. On windows, make for windows and the LunarG Vulkan SDK can provide these. Omit --help and add other command-line arguments as necessary for each sample.

In the table below, please follow the link in the name or image of each example for more information.

Screenshot Description
compute image test_compute
Initial test for synchronisation between compute and graphics. Implements a toy path tracer in a single compute shader, reads the result during rasterization of the UI.
ray_tracing image test_ray_tracing
Test of the VK_KHR_acceleration_structure and VK_KHR_ray_tracing_pipeline extensions. Loads a PLY format mesh and draws a few instances using either rasterization or ray tracing.
mesh_shader image test_mesh_shader
Test of the VK_NV_mesh_shader extension. Loads a PLY format mesh, makes some clusters, then draws the result using either the standard vertex pipeline or mesh shaders. Cluster-level backface culling is implemented efficiently in the task shader using subgroup operations from the GL_KHR_shader_subgroup_ballot GLSL extension.
living-room-2 image path_tracer
A path tracer built on Vulkan ray tracing with support for spectral rendering and several different surfaces and light types. The implementation also makes use of the VK_KHR_buffer_device_address and VK_EXT_descriptor_indexing extensions for bindless buffers and textures respectively. The README for this example contains many more details. The scenes shown here are from these rendering resources made available by Benedikt Bitterli.
coherent_hashing image coherent_hashing
Implementation of Coherent Parallel Hashing, which is a useful GPU data structure for hash tables when the keys are coherent.

Potential Future Work

  • Buffer views?
  • Use futures for async loading
  • Occlusion culling in mesh shader example
  • Many path tracer features (tracked here)

caldera's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

caldera's Issues

Specialization constants

Hi,

I assume you're just sharing this project without an intent of making an "official" library, but it would be nice if specialization constants are supported. I implemented it myself in caldera, but I'm not making it a PR as I'm guessing you can make p_specialization_info in PipelineShaderStageCreateInfo (in spark) an option? At the moment it's a raw pointer.

I implemented it for myself & only for compute. I changed PipelineCache's get_compute and fixed dispatch_helper & compute app.
I utilized / tested it by changing a shader #define to layout(constant_id = 0) const uint SEQUENCE_COUNT = 1024;.

I might end up using this at least for a while, so thought I should make this a request.

Nice work by the way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.