Giter Club home page Giter Club logo

vulkan_renderer's Introduction

This is a toy renderer written in C using Vulkan. It is intentionally minimalist. It has been developed and used for the papers "BRDF Importance Sampling for Polygonal Lights" and "BRDF Importance Sampling for Linear Lights." Correspondingly, there are two branches. For more information see: https://momentsingraphics.de/ToyRendererOverview.html

Downloading Data

Scenes and other data that are needed to run the renderer are available on the websites for the papers: http://momentsingraphics.de/Siggraph2021.html http://momentsingraphics.de/HPG2021.html

Building the Renderer

The renderer is written in C99 with few dependencies. Imgui and GLFW are specified as submodules, so you should be able to clone them alongside this repository (use git clone --recurse-submodules). You also need the latest Vulkan SDK (version 1.2.176.1 or later) available here: https://vulkan.lunarg.com/sdk/home

On Linux the Vulkan SDK should be available via your package manager. Validation layers are needed for a debug build but not for a release build. You may have to use beta drivers, depending on what your package repositories provide otherwise. https://developer.nvidia.com/vulkan-driver

Vulkan on macOS is notoriously problematic but it may work with the latest SDK.

Once all dependencies are available, use CMake to create project files and build.

Running the Renderer

Get data files first (see above). Run the binary with current working directory vulkan_renderer.

Ray tracing uses the extension VK_KHR_ray_query. The latest NVIDIA drivers for Windows support it: https://www.nvidia.com/download/index.aspx

To use ray tracing, you will also need a GPU that supports it. That includes all GPUs with RTX in the name. Pascal or Turing GPUs do not support the required extensions. AMD GPUs of the Radeon RX 6000 series should also work but have not been tested.

You can run the application without ray tracing but your driver has to support Vulkan 1.2. If the demo does not start, take a look at its command line output.

Important Code Files

The GLSL implementation of our techniques is found in: src/shaders/polygon_sampling.glsl src/shaders/line_sampling.glsl (on the corresponding branch)

The complete shading pass, including our multiple importance sampling, is part of: src/shaders/shading_pass.frag.glsl

Licenses

Most code in this package is licensed under the terms of the GPLv3. However, you have the option to use the core of the sampling methods in polygon_sampling.glsl and line_sampling.glsl under the BSD license. See the comments at the top of each file for details.

vulkan_renderer's People

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.