Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.
/ polyflare Public archive

Wgpu implementation of polynomial optics for lens flares

Notifications You must be signed in to change notification settings

luksab/polyflare

Repository files navigation

Polyflare

This is the wgpu implentation of my bachelor thesis about polynomial optics for physically based lens flare rendering.

Further work is going to happen in private.

This uses the polynomial_optics library for the CPU implementation of dense and sparse polynomials. Polynomial_optics also contains the CPU code for raytracing though the lens system and fitting a dense polynomial to it and selecting a sparse one from that.

All the GPU code is in the gpu crate.

Thesis

The thesis is available here.

Building

You'll need Rust and some additional dependencies on Linux, which could be installed by running

apt install libxcursor-dev libxrandr-dev libx11-dev libxxf86vm-dev libxi-dev -y
apt install libvulkan1 libvulkan-dev mesa-vulkan-drivers vulkan-utils -y

Nix

There is a shell.nix for those using Nix

Docker

There is also a Dockerfile which is semi-working

Running

To run the gpu crate just run

cargo run --release -p gpu

If needed you can add the arguments by running

cargo run --release -p gpu -- [arguments]

Arguments

-l or --low_requirements: lower minimum requirements
-b or --backend [backend]: select the backend from ["all", , "opengl", "gl", "vulkan", "dx", "dx12", "dx11", "metal", "all"]
-v or --disable_vsync: disable waiting for next blanking interval

Example output

example

About

Wgpu implementation of polynomial optics for lens flares

Topics

Resources

Stars

Watchers

Forks

Languages