GithubHelp home page GithubHelp logo

zhouhang95 / vulkan-examples-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adrien-ben/vulkan-examples-rs

0.0 0.0 0.0 2.48 MB

Vulkan examples writting in Rust

Shell 0.17% Rust 95.45% PowerShell 0.24% GLSL 4.13%

vulkan-examples-rs's Introduction

vulkan-examples-rs

Collection of Vulkan examples that I make to learn stuff in Rust using ash.

screenshot

Examples

You can run one of the following example.

  • rt_triangle: Ray-traced triangle.
  • rt_shadows: Ray-traced gltf model with simulated sunlight shadow. It has one BLAS with multiple geometries. Light and camera controls with imgui.
  • rt_reflections: Ray-traced iterative (not recursive) reflections.
  • triangle: Rasterized triangle.
  • gpu_particles: Particles simulated on the gpu using a compute shader.
  • mandelbrot: Render mandelbrot set on gpu with expensive setting. The goal is to be gpu bound with a simple setup for some tests.
# Powershell example (all scripts have a .sh version)

# Compile all glsl shaders to spir-v 1.4
.\scripts\compile_shaders.ps1

# Enable validation layers and set log level to debug
.\scripts\debug.ps1 <example>

# Compiles with --release and set log level to info
.\scripts\run.ps1 <example>

Controls

For examples with interactive camera you can move the camera with

  • WASD to move
  • Ctrl and space to go up or down
  • Right-click and move the mouse around to look

You can alse press R to cycle through the performance information.

Requirements

  • Rust 1.64

All examples use Vulkan 1.3 and the following features:

  • dynamic_rendering
  • synchronization2

Ray tracing examples use the following extensions and features:

  • VK_KHR_ray_tracing_pipeline
    • ray_tracing_pipeline
  • VK_KHR_acceleration_structure
    • acceleration_structure
  • VK_KHR_deferred_host_operations
  • Vulkan 1.2's features
    • runtime_descriptor_array
    • buffer_device_address

RT is only enabled on examples using it, so other examples can run on hardware that does not support it.

Useful links

vulkan-examples-rs's People

Contributors

adrien-ben avatar

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.