💡 Experimental real-time global illumination renderer 🦀

Related tags

GUI kajiya
Overview

💡 kajiya

Experimental real-time global illumination renderer made with Rust and Vulkan

Embark Embark dependency status Build status

Its general goal is to get as close as possible to path-traced reference at real-time rates in dynamic scenes, without any precomputed light transport, or manually placed light probes.

kajiya does not currently aim to be a fully-featured renderer used to ship games, support all sorts of scenes, lighting phenomena, or a wide range of hardware. It's a hobby project, takes a lot of shortcuts, and is perpetually a work in progress.

For more context, check out our announcement article on Embark's Medium. You'll also get to learn how kajiya connects to our rendering work, and the rust-gpu project!

image (5) Ruins environment rendered in kajiya. Scene by Crebotoly

Features

  • Hybrid rendering using a mixture of raster, compute, and ray-tracing
  • Dynamic global illumination
    • Multi-bounce temporally-recurrent voxel-based diffuse
    • Short-range ray-traced diffuse for high-frequency details
    • Single bounce specular, falling back to diffuse after the first hit
  • Sun with ray-traced soft shadows
  • Standard PBR with GGX and roughness/metalness
    • Energy-preserving multi-scattering BRDF
  • Reference path-tracing mode
  • Temporal super-resolution and anti-aliasing
  • Natural tone mapping
  • Physically-based glare
  • Basic motion blur
  • Contrast-adaptive sharpening
  • Optional DLSS support
  • GLTF mesh loading (no animations yet)
  • A render graph running it all

Technical overview

Platforms

kajiya currently works on a limited range of operating systems and hardware.

Hardware:

  • Nvidia RTX series
  • Nvidia GTX 1060 and newer (slow: driver-emulated ray-tracing)
  • AMD Radeon RX 6000 series

Operating systems:

  • Windows
  • Linux

(Some) Linux dependencies

  • libtinfo5
  • uuid-dev

Building and running

There's a very minimal asset pipeline in bake.rs, which converts meshes from GLTF to an internal flat format, and calculates texture mips. In order to bake all the provided meshes, run:

  • Windows: bake.cmd
  • Linux: ./bake.sh

When done, run the renderer demo (view app from crates/bin/view) via:

  • Windows: build_and_run.cmd [scene_name]
  • Linux: ./build_and_run.sh [scene_name]

Where [scene_name] is one of the file names in assets/scenes, without the .ron extension, e.g.:

build_and_run.cmd battle

or

cargo run --bin view --release -- --scene battle --width 1920 --height 1080 --no-debug

Controls in the view app

  • WSAD, QE - movement
  • Mouse + RMB - rotate the camera
  • Mouse + LMB - rotate the sun
  • Shift - move faster
  • Ctrl - move slower
  • Space - switch to reference path tracing
  • Backspace - reset view to previous saved state
  • Tab - show/hide the UI

Resolution scaling

DPI

For the view app, DPI scaling in the operating system affects the physical number of pixels of the rendering output. The --width and --height parameters correspond to logical window size and the internal rendering resolution. Suppose the OS uses DPI scaling of 1.5, and the app is launched with --width 1000, the actual physical width of the window will be 1500 px. Rendering will still happen at 1000 px, with upscaling to 1500 px at the very end, via a Catmull-Rom kernel.

Temporal upsampling

kajiya can also render at a reduced internal resolution, and reconstruct a larger image via temporal upsampling, trading quality for performance. A custom temporal super-resolution algorithm is used by default, and DLSS is supported on some platforms. Both approaches result in better quality than what could be achieved by simply spatially scaling up the image at the end.

For example, --width 1920 --height 1080 --temporal-upsampling 1.5 will produce a 1920x1080 image by upsampling by a factor of 1.5 from 1280x720. Most of the rendering will then happen with 1.5 * 1.5 = 2.25 times fewer pixels, resulting in an almost 2x speedup.

Adding Meshes and Scenes

To add new mesh(es), open bake.cmd (Win) / bake.sh (Linux), and add

  • cargo run --bin bake --release -- --scene "[path]" --scale 1.0 -o [mesh_name]

To add new scenes, in \assets\scenes, create a [scene_name].ron with the following content:

(
    instances: [
        (
            position: (0, 0, 0),
            mesh: "[mesh_name]",
        ),
    ]
)

Technical guides

Known issues

  • Vulkan API usage is extremely basic. Resources are usually not released, and barriers aren't optimal.
  • There are hard limit on mesh data and instance counts. Exceeding those limits will result in panics and Vulkan validation errors / driver crashes.
  • Window (framebuffer) resizing is not yet implemented.
  • The voxel GI uses a fixed-size volume around the origin by default.
    • Use --gi-volume-scale to change its extent in the view app
    • It can be configured to use camera-centered cascades at an extra performance cost (see CASCADE_COUNT and SCROLL_CASCADES in csgi.rs)
  • Denoising needs more work (always).

Acknowledgments

This project is made possible by the awesome open source Rust community, and benefits from a multitude of crates 💖 🦀

Special shout-outs go to:

  • Felix Westin for his MinimalAtmosphere, which this project uses for sky rendering
  • AMD, especially Dominik Baumeister and Guillaume Boissé for the FidelityFX Shadow Denoiser, which forms the basis of shadow denoising in kajiya.
  • Maik Klein for the Vulkan wrapper ash, making it easy for kajiya to talk to the GPU.
  • Traverse Research and Jasper Bekkers for a number of highly relevant crates:

Contribution

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started. Please also read our Contributor Terms before you make any contributions.

Any contribution intentionally submitted for inclusion in an Embark Studios project, shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:

License

This contribution is dual licensed under EITHER OF

at your option.

For clarity, "your" refers to Embark or any other licensee/user of the contribution.

Comments
  • Got kajiya working on Ubuntu 16.04! :tada:

    Got kajiya working on Ubuntu 16.04! :tada:

    Let's try to build kajiya on Ubuntu 16.04! :smiley:

    First try:

    constantine@ubuntu:~$ cd /home/constantine/Downloads/
    constantine@ubuntu:~/Downloads$ git clone https://github.com/EmbarkStudios/kajiya --recursive
    Cloning into 'kajiya'...
    remote: Enumerating objects: 9514, done.
    remote: Counting objects: 100% (5369/5369), done.
    remote: Compressing objects: 100% (2503/2503), done.
    remote: Total 9514 (delta 3585), reused 4505 (delta 2780), pack-reused 4145
    Receiving objects: 100% (9514/9514), 103.69 MiB | 9.16 MiB/s, done.
    Resolving deltas: 100% (6455/6455), done.
    Checking connectivity... done.
    constantine@ubuntu:~/Downloads$ cd kajiya/
    constantine@ubuntu:~/Downloads/kajiya$ ./bake.sh
    ./bake.sh: line 1: cargo: command not found
    ./bake.sh: line 4: target/release/bake: No such file or directory
    ./bake.sh: line 5: target/release/bake: No such file or directory
    ./bake.sh: line 6: target/release/bake: No such file or directory
    ./bake.sh: line 7: target/release/bake: No such file or directory
    ./bake.sh: line 8: target/release/bake: No such file or directory
    ./bake.sh: line 9: target/release/bake: No such file or directory
    ./bake.sh: line 10: target/release/bake: No such file or directory
    ./bake.sh: line 11: target/release/bake: No such file or directory
    ./bake.sh: line 12: target/release/bake: No such file or directory
    ./bake.sh: line 13: target/release/bake: No such file or directory
    ./bake.sh: line 14: target/release/bake: No such file or directory
    ./bake.sh: line 15: target/release/bake: No such file or directory
    ./bake.sh: line 16: target/release/bake: No such file or directory
    

    Yeah... :smiley: Gotta install cargo then...

    bug 
    opened by ghost 37
  • Add NSI C API

    Add NSI C API

    Is your feature request related to a problem? Please describe.

    Sending 'live' data from a DCC app (Maya, Houdini, etc.) to kajia. NSI is an open, node-based C API for DCC apps to communicate with offline renderers. It was inspired by/supersedes the RenderMan API in the 3Delight renderer.

    I would be interested in working on this/contributing/helping out. There is a Rust wrapper for NSI (that I maintain) but this is not relevant here (see below).

    Describe the solution you'd like

    Add the NSI hooks to populate/edit the scene graph of kajia and expose these as a C binding.

    This would allow sending data from DCCs to kajia via existing OSS plug-ins that use this API (see below).

    Describe alternatives you've considered

    There are no good alternatives. Something like USD, API wise, is a total PITA in comparison.

    On a sidenote, as there is a USD Hydra delegate for NSI, adding NSI support to kajia would also mean hooking the renderer into USD via Hydra as a side-effect.

    Additional context

    There are OSS plug-ins that use NSI for Houdini, Maya, Katana and Cinema4D. These would require minimal changes (mostly shaders-related as NSI is built around the idea that a renderer has OSL support) to work with a 3rd party NSI implementation.

    enhancement 
    opened by virtualritz 28
  • run kajiya in OSX

    run kajiya in OSX

    Describe the bug can't run kajiya in OSX

    To Reproduce Steps to reproduce the behavior:

    1. run build_and_run.sh
    2. See error
      = note: ld: library not found for -luuid
              clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    Expected behavior the error is expected, but not sure how to get it work in OSX try to figure out how to run it in OSX

    Device:

    • Device: m1max
    • OS: OSX
    ProductName:	macOS
    ProductVersion:	12.0.1
    BuildVersion:	21A559
    
    • Version master(b67eaea2272924eae053b5918afedf2a318b8bd9)
    question 
    opened by tlightsky 19
  • Convert copy_depth, reproj map, post_combine, ssgi, tonemap, blur shaders to Rust

    Convert copy_depth, reproj map, post_combine, ssgi, tonemap, blur shaders to Rust

    Part of https://github.com/EmbarkStudios/kajiya/issues/17

    In addition to what it says on the tin, this does some folder restructuring.

    • Moves assets/rust-shaders/compiled to assets/rust-shaders-compiled
    • Moves assets/rust-shaders/builder to crates/bin/rust-shader-builder
    • Moves assets/rust-shaders/shaders to crates/lib/rust-shaders
    • Adds crates/lib/rust-shaders-shared which is a crate which may be depended on by both CPU code and shaders such that data structures can be shared directly and modified in only one place.
    opened by fu5ha 9
  • GTX 1650 not supported

    GTX 1650 not supported

    Describe the bug The description says that GTX 1060 and newer are supported (with slow, driver-emulated ray-tracing) but the GTX 1650 does not seem to work, with a thread panic at run-time.

    To Reproduce Steps to reproduce the behavior:

    1. Follow the building and running instructions
    2. Type build_and_run.cmd battle

    Expected behavior Demo should run successfully.

    Screenshots Compilation succeeds but the following is output when running:

        sparse_properties: PhysicalDeviceSparseProperties {
            residency_standard2_d_block_shape: 1,
            residency_standard2_d_multisample_block_shape: 1,
            residency_standard3_d_block_shape: 1,
            residency_aligned_mip_size: 0,
            residency_non_resident_strict: 1,
        },
    } }
    thread 'main' panicked at 'Device extension not supported: VK_KHR_pipeline_library', crates\lib\kajiya-backend\src\vulkan\device.rs:220:21
    stack backtrace:
       0: std::panicking::begin_panic_handler
                 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\std\src\panicking.rs:517
       1: core::panicking::panic_fmt
                 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\core\src\panicking.rs:100
       2: kajiya_backend::vulkan::device::Device::create
                 at .\crates\lib\kajiya-backend\src\vulkan\device.rs:220
       3: kajiya_backend::vulkan::RenderBackend::new<winit::window::Window>
                 at .\crates\lib\kajiya-backend\src\vulkan\mod.rs:89
       4: kajiya_simple::main_loop::SimpleMainLoop::build
                 at .\crates\lib\kajiya-simple\src\main_loop.rs:235
       5: kajiya_simple::main_loop::SimpleMainLoopBuilder::build
                 at .\crates\lib\kajiya-simple\src\main_loop.rs:154
       6: view::main
                 at .\crates\bin\view\src\main.rs:112
       7: core::ops::function::FnOnce::call_once
                 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\ops\function.rs:227
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    error: process didn't exit successfully: `target\release\view.exe --scene battle --width 1920 --height 1080 --no-debug` (exit code: 101)
    

    Device:

    • OS: Windows 11 Home Insider Preview (22523.1000)
    • Card: NVIDIA GeForce GTX 1650
    • Driver: Latest Game Ready Driver (497.29)
    • Toolchain: stable-x86_64-pc-windows-msvc (default)
    • Visual Studio 2019 (16.10.4)
    • rustc 1.57.0 (f1edd0429 2021-11-29)

    Additional context Perhaps this graphics card is simply not supported, in which case more clarity about supported graphics cards would be useful.

    documentation question 
    opened by xperi-developer 8
  • compiling view 0.1.0 on win10

    compiling view 0.1.0 on win10

    i get the following error with the latest build

    Compiling view v0.1.0 (c:\kajiya\crates\bin\view) error[E0308]: mismatched types --> crates\bin\view\src\main.rs:146:33 | 146 | .with(Position::new(position)) | ^^^^^^^^ expected structdolly::glam::Vec3, found structkajiya_simple::Vec3| = note: perhaps two different versions of crateglam` are being used?

    error[E0308]: mismatched types --> crates\bin\view\src\main.rs:147:49 | 147 | .with(YawPitch::new().rotation_quat(rotation)) | ^^^^^^^^ expected struct dolly::glam::Quat, found struct kajiya_simple::Quat | = note: perhaps two different versions of crate glam are being used?

    error[E0308]: mismatched types --> crates\bin\view\src\main.rs:195:30 | 195 | camera_position: camera.final_transform.position, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct kajiya_simple::Vec3, found struct dolly::glam::Vec3 | = note: perhaps two different versions of crate glam are being used?

    error[E0308]: mismatched types --> crates\bin\view\src\main.rs:196:30 | 196 | camera_rotation: camera.final_transform.rotation, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct kajiya_simple::Quat, found struct dolly::glam::Quat | = note: perhaps two different versions of crate glam are being used?

    error[E0277]: cannot multiply dolly::glam::Quat by kajiya_simple::Vec3 --> crates\bin\view\src\main.rs:236:17 | 236 | * Vec3::new(input["move_right"], input["move_up"], -input["move_fwd"]) | ^ no implementation for dolly::glam::Quat * kajiya_simple::Vec3 | = help: the trait Mul<kajiya_simple::Vec3> is not implemented for dolly::glam::Quat

    error[E0308]: mismatched types --> crates\bin\view\src\main.rs:250:37 | 250 | state.camera_position = camera.final_transform.position; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct kajiya_simple::Vec3, found struct dolly::glam::Vec3 | = note: perhaps two different versions of crate glam are being used?

    error[E0308]: mismatched types --> crates\bin\view\src\main.rs:251:37 | 251 | state.camera_rotation = camera.final_transform.rotation; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct kajiya_simple::Quat, found struct dolly::glam::Quat | = note: perhaps two different versions of crate glam are being used?

    error[E0308]: mismatched types --> crates\bin\view\src\main.rs:295:44 | 295 | .set_rotation_quat(state.camera_rotation); | ^^^^^^^^^^^^^^^^^^^^^ expected struct dolly::glam::Quat, found struct kajiya_simple::Quat | = note: perhaps two different versions of crate glam are being used?

    error[E0308]: mismatched types --> crates\bin\view\src\main.rs:296:64 | 296 | camera.driver_mut::().position = state.camera_position; | ^^^^^^^^^^^^^^^^^^^^^ expected struct dolly::glam::Vec3, found struct kajiya_simple::Vec3 | = note: perhaps two different versions of crate glam are being used?

    error[E0599]: the method through exists for tuple (dolly::glam::Vec3, dolly::glam::Quat), but its trait bounds were not satisfied --> crates\bin\view\src\main.rs:373:22 | 373 | .through(&lens), | ^^^^^^^ method cannot be called on (dolly::glam::Vec3, dolly::glam::Quat) due to unsatisfied trait bounds | = note: the following trait bounds were not satisfied: (dolly::glam::Vec3, dolly::glam::Quat): IntoCameraBodyMatrices which is required by (dolly::glam::Vec3, dolly::glam::Quat): kajiya_simple::LookThroughCamera &(dolly::glam::Vec3, dolly::glam::Quat): IntoCameraBodyMatrices which is required by &(dolly::glam::Vec3, dolly::glam::Quat): kajiya_simple::LookThroughCamera &mut (dolly::glam::Vec3, dolly::glam::Quat): IntoCameraBodyMatrices which is required by &mut (dolly::glam::Vec3, dolly::glam::Quat): kajiya_simple::LookThroughCamera

    Some errors have detailed explanations: E0277, E0308, E0599. For more information about an error, try rustc --explain E0277. error: could not compile view due to 10 previous errors`

    To Reproduce Steps to reproduce the behavior:

    1. download the latest build (commit [07218ed])
    2. bake
    3. build_and_run.cmd conference

    Expected behavior To have no errors and run.

    Device:

    • OS: Win10 Pro x64 (v.21H2, build 19044.1526)
    • Browser: chrome
    • Version: 99.0.4844.51
    bug 
    opened by nassosyian 6
  • Normal map exists but reliefs are missing

    Normal map exists but reliefs are missing

    Hello,

    First thing, thanks for your awesome work! I have an issue with this glTF model. According to glTF Report app the model is valid:

    T-Rex - glTF Report - Valid

    Its reliefs appear:

    T-Rex - glTF Report

    But Kajiya seems to ignore its normal map:

    T-Rex - Kajiya

    Technical details:

    • Kajiya (latest)
    • Windows 10
    • GTX 1060 6GB
    bug 
    opened by SamuelTallet 4
  • Build error on Win10: linker lld-link.exe not found

    Build error on Win10: linker lld-link.exe not found

    On Windows 10 after a git clone, running bake.cmd:

    C:\Users\mdesmedt\git\kajiya>bake.cmd
       Compiling proc-macro2 v1.0.30
       Compiling syn v1.0.80
       Compiling winapi v0.3.9
       Compiling memchr v2.4.1
       Compiling futures-core v0.3.17
       Compiling libm v0.2.1
       Compiling libc v0.2.105
       Compiling log v0.4.14
       Compiling serde_derive v1.0.130
       Compiling proc-macro-hack v0.5.19
       Compiling serde v1.0.130
       Compiling proc-macro-nested v0.1.7
       Compiling futures-task v0.3.17
       Compiling futures-channel v0.3.17
       Compiling failure_derive v0.1.8
       Compiling crc32fast v1.2.1
       Compiling ryu v1.0.5
       Compiling serde_json v1.0.68
       Compiling pin-utils v0.1.0
       Compiling com-rs v0.2.1
       Compiling convert_case v0.4.0
       Compiling async-trait v0.1.51
       Compiling weezl v0.1.5
       Compiling parking_lot_core v0.8.5
       Compiling inflections v1.1.1
       Compiling rand_core v0.6.3
       Compiling lazy_static v1.4.0
       Compiling scopeguard v1.1.0
       Compiling color_quant v1.1.0
       Compiling itoa v0.4.8
       Compiling anyhow v1.0.44
       Compiling jpeg-decoder v0.1.22
       Compiling smallvec v1.7.0
       Compiling derive_builder v0.9.0
       Compiling unicode-width v0.1.9
       Compiling scoped_threadpool v0.1.9
       Compiling nanoserde-derive v0.1.18
    error: linker `lld-link.exe` not found
      |
      = note: The system cannot find the file specified. (os error 2)
    
    note: the msvc targets depend on the msvc linker but `link.exe` was not found
    
    note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option
    
    error: could not compile `com-rs` due to previous error
    warning: build failed, waiting for other jobs to finish...
    error: build failed
    

    I have both VS 2019 and VS 2022 installed, both with C++ support, but something in the deps appears to be looking for lld-link.exe. Is having the LLVM toolchain required?

    bug 
    opened by mdesmedt 4
  • GGX_Smith implementation error?

    GGX_Smith implementation error?

    I am a student who is learning pbr right now, and i have an question about ggx smith implementation.

    I am confused that maybe i misunderstand somthing or it is just your impletation is wrong.

    In your shader brdf.hlsl, line 114, function g_smith_ggx1().

    I try to change the form of this equation into the same form in https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2017/Presentations/Hammon_Earl_PBR_Diffuse_Lighting.pdf (On page 80). The G1(v) formular. But I realized that your implementation is (2 * ndotv) / (ndotv + sqrt(ndotv^2 + α^2 * (1 - ndotv^2))), and the fomular in GDC is (2 * ndotv) / (ndotv + sqrt(α^2 + ndotv^2 * (1 - α^2))).

    It seems that term α^2 and ndotv is reversed in finding square root of some value.

    Your: sqrt(ndotv^2 + α^2 * (1 - ndotv^2)). GDC: sqrt(α^2 + ndotv^2 * (1 - α^2)).

    Maybe your implementation is different with the formular in GDC? But i can't understand. Thanks in advance for your help.

    Your project is a really good learning material!

    bug 
    opened by CrystaLamb 3
  • Error: Allocation failed for

    Error: Allocation failed for "vertex buffer": OutOfMemory

    To Reproduce I compiled kajiya example with a command $ cargo run --bin view --release

    Full output

    [2022-09-24 14:43:00][winit::platform_impl::platform::x11::window][INFO] Guessed window scale factor: 1
    [2022-09-24 14:43:00][kajiya_simple::main_loop][INFO] Internal rendering extent: 1920x1080
    [2022-09-24 14:43:00][kajiya_backend::vulkan::instance][INFO] Created a Vulkan instance
    [2022-09-24 14:43:00][kajiya_backend::vulkan][INFO] Available physical devices: [
        "NVIDIA GeForce GT 740",
        "llvmpipe (LLVM 12.0.0, 128 bits)",
    ]
    [2022-09-24 14:43:00][kajiya_backend::vulkan][INFO] Selected physical device: PhysicalDevice { PhysicalDeviceProperties {
        api_version: 4202671,
        driver_version: 1973633216,
        vendor_id: 4318,
        device_id: 4040,
        device_type: DISCRETE_GPU,
        device_name: "NVIDIA GeForce GT 740",
        pipeline_cache_uuid: [
            152,
            226,
            37,
            134,
            81,
            32,
            191,
            211,
            161,
            61,
            162,
            219,
            162,
            110,
            202,
            51,
        ],
        limits: PhysicalDeviceLimits {
            max_image_dimension1_d: 16384,
            max_image_dimension2_d: 16384,
            max_image_dimension3_d: 2048,
            max_image_dimension_cube: 16384,
            max_image_array_layers: 2048,
            max_texel_buffer_elements: 134217728,
            max_uniform_buffer_range: 65536,
            max_storage_buffer_range: 4294967295,
            max_push_constants_size: 256,
            max_memory_allocation_count: 4294967295,
            max_sampler_allocation_count: 4000,
            buffer_image_granularity: 65536,
            sparse_address_space_size: 1099511627775,
            max_bound_descriptor_sets: 32,
            max_per_stage_descriptor_samplers: 1048576,
            max_per_stage_descriptor_uniform_buffers: 15,
            max_per_stage_descriptor_storage_buffers: 1048576,
            max_per_stage_descriptor_sampled_images: 1048576,
            max_per_stage_descriptor_storage_images: 1048576,
            max_per_stage_descriptor_input_attachments: 1048576,
            max_per_stage_resources: 4294967295,
            max_descriptor_set_samplers: 1048576,
            max_descriptor_set_uniform_buffers: 90,
            max_descriptor_set_uniform_buffers_dynamic: 15,
            max_descriptor_set_storage_buffers: 1048576,
            max_descriptor_set_storage_buffers_dynamic: 16,
            max_descriptor_set_sampled_images: 1048576,
            max_descriptor_set_storage_images: 1048576,
            max_descriptor_set_input_attachments: 1048576,
            max_vertex_input_attributes: 32,
            max_vertex_input_bindings: 32,
            max_vertex_input_attribute_offset: 2047,
            max_vertex_input_binding_stride: 2048,
            max_vertex_output_components: 128,
            max_tessellation_generation_level: 64,
            max_tessellation_patch_size: 32,
            max_tessellation_control_per_vertex_input_components: 128,
            max_tessellation_control_per_vertex_output_components: 128,
            max_tessellation_control_per_patch_output_components: 120,
            max_tessellation_control_total_output_components: 4216,
            max_tessellation_evaluation_input_components: 128,
            max_tessellation_evaluation_output_components: 128,
            max_geometry_shader_invocations: 32,
            max_geometry_input_components: 128,
            max_geometry_output_components: 128,
            max_geometry_output_vertices: 1024,
            max_geometry_total_output_components: 1024,
            max_fragment_input_components: 128,
            max_fragment_output_attachments: 8,
            max_fragment_dual_src_attachments: 1,
            max_fragment_combined_output_resources: 16,
            max_compute_shared_memory_size: 49152,
            max_compute_work_group_count: [
                2147483647,
                65535,
                65535,
            ],
            max_compute_work_group_invocations: 1536,
            max_compute_work_group_size: [
                1536,
                1024,
                64,
            ],
            sub_pixel_precision_bits: 8,
            sub_texel_precision_bits: 8,
            mipmap_precision_bits: 8,
            max_draw_indexed_index_value: 4294967295,
            max_draw_indirect_count: 4294967295,
            max_sampler_lod_bias: 15.0,
            max_sampler_anisotropy: 16.0,
            max_viewports: 16,
            max_viewport_dimensions: [
                16384,
                16384,
            ],
            viewport_bounds_range: [
                -32768.0,
                32768.0,
            ],
            viewport_sub_pixel_bits: 8,
            min_memory_map_alignment: 64,
            min_texel_buffer_offset_alignment: 256,
            min_uniform_buffer_offset_alignment: 256,
            min_storage_buffer_offset_alignment: 16,
            min_texel_offset: -8,
            max_texel_offset: 7,
            min_texel_gather_offset: -32,
            max_texel_gather_offset: 31,
            min_interpolation_offset: -0.5,
            max_interpolation_offset: 0.4375,
            sub_pixel_interpolation_offset_bits: 4,
            max_framebuffer_width: 16384,
            max_framebuffer_height: 16384,
            max_framebuffer_layers: 2048,
            framebuffer_color_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            framebuffer_depth_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            framebuffer_stencil_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            framebuffer_no_attachments_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            max_color_attachments: 8,
            sampled_image_color_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            sampled_image_integer_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            sampled_image_depth_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            sampled_image_stencil_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            storage_image_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8,
            max_sample_mask_words: 1,
            timestamp_compute_and_graphics: 1,
            timestamp_period: 1.0,
            max_clip_distances: 8,
            max_cull_distances: 8,
            max_combined_clip_and_cull_distances: 8,
            discrete_queue_priorities: 2,
            point_size_range: [
                1.0,
                2047.9375,
            ],
            line_width_range: [
                1.0,
                64.0,
            ],
            point_size_granularity: 0.0625,
            line_width_granularity: 0.0625,
            strict_lines: 1,
            standard_sample_locations: 1,
            optimal_buffer_copy_offset_alignment: 1,
            optimal_buffer_copy_row_pitch_alignment: 1,
            non_coherent_atom_size: 64,
        },
        sparse_properties: PhysicalDeviceSparseProperties {
            residency_standard2_d_block_shape: 1,
            residency_standard2_d_multisample_block_shape: 1,
            residency_standard3_d_block_shape: 1,
            residency_aligned_mip_size: 1,
            residency_non_resident_strict: 0,
        },
    } }
    [2022-09-24 14:43:00][kajiya_backend::vulkan::device][INFO] Ray tracing extension not supported: VK_KHR_vulkan_memory_model
    [2022-09-24 14:43:00][kajiya_backend::vulkan::device][INFO] Created a Vulkan device
    [2022-09-24 14:43:00][kajiya_backend::vulkan][INFO] Available surface formats: [
        SurfaceFormatKHR {
            format: B8G8R8A8_UNORM,
            color_space: SRGB_NONLINEAR,
        },
        SurfaceFormatKHR {
            format: B8G8R8A8_SRGB,
            color_space: SRGB_NONLINEAR,
        },
    ]
    [2022-09-24 14:43:00][kajiya_backend::vulkan::swapchain][INFO] Swapchain image count: 3
    [2022-09-24 14:43:00][kajiya_backend::vulkan::swapchain][INFO] Presentation mode: FIFO_RELAXED
    Error: Allocation failed for "vertex buffer": OutOfMemory
    

    Device:

    • OS: Ubuntu 20.04
    • RAM: 8GB
    • CPU: Intel Xeon E5450 (4) @ 3.000GHz
    • GPU: NVIDIA GeForce GT 740

    Additional context Is my PC too potato to run kajiya in any way (even on the lowest settings), or am I doing smth wrong?

    bug 
    opened by konceptosociala 3
  • Interior rendering lighting changes based on world position

    Interior rendering lighting changes based on world position

    Describe the bug It seems that interior areas are well lit and do not match the reference at all when at different world positions.

    I am attempting to render a house and at the origin it renders correctly (according to the reference - light not coming through windows is a different issue) Interior

    Walking down the house (scale is 1 unit = 1m in case that makes a difference) there is a transition area where light is coming from "somewhere" Transition

    Here is the reference of that area Transition_ref

    Until the front rooms are fully lit FrontRoom

    Reference: FrontRoom_ref

    If I move the house in the scene file (say by 10m), the lit areas move around the house

    I am guessing that perhaps there is some setting where interior lighting is only performed correctly at some small distance from the origin? Or perhaps there is some world light that starts at this position?

    Let me know if it would be helpful to have the sample data - I will see if I can get permission to supply a cut down version.

    Device:

    • OS: Windows 10
    • Version: Git sysnch of 10 January 2022
    bug 
    opened by dtrebilco 3
  • Incorrect shading coordinate system while raytracing.

    Incorrect shading coordinate system while raytracing.

    Describe the bug In assets/shaders/rt/gbuffer.rchit.hlsl, you computes the texture lod by using ray cone method. In function compute_texture_lod(), parameter takes surf_normal whichi is computed by the vertices data. But notice that the lod computation take place in world space, but the surf_normal you passes in is in object space. This will produce incorrect texture sample! (I test on my own impl in my toy engine)

    Fix: add float3 surf_normal_ws = normal(mul(ObjectToWorld3x4(), float4(surf_normal, 0.0))); then use surf_normal_ws as the input in compute_texture_lod();

    This will produce incorrect lod and strange banding effect depends on the view direction. incorrect

    This is the correct image. correct

    bug 
    opened by CrystaLamb 0
  • Implement Area Lights For Clean Emissives

    Implement Area Lights For Clean Emissives

    Is your feature request related to a problem? Please describe. — Currently, emissive materials cause a scene to be super noisy / boil-ey as area lights are unsupported. In dark / night scenes, this becomes quite apparent. Once resolved, dark / night scenes could look potentially stunning! This is particularly crucial for sci-fi scenes, and for fantasy scenes such as those with bioluminescent foliage, etc.

    Describe the solution you'd like — Implement area light support; possibly with RTXDI or some variation thereof. I leave the details to the pros, but let me know how I can help if possible. ^__^

    enhancement 
    opened by MartianDays 1
  • Bump smallvec from 1.0.0 to 1.10.0 in /crates/lib/ash-imgui

    Bump smallvec from 1.0.0 to 1.10.0 in /crates/lib/ash-imgui

    Bumps smallvec from 1.0.0 to 1.10.0.

    Release notes

    Sourced from smallvec's releases.

    v1.10.0

    • Add optional NatVis debugger visualization (#286).
    • Mark Array::size as inline (#289).

    v1.9.0

    • Add retain_mut as an alias for retain, for compatibility with std::vec::Vec (#283).

    v1.8.1

    • Optimize inserts at the end of the vector (#282).
    • Fix possible aliasing issues with raw pointers (#277).
    • Fix format of license field in Cargo manifest (#278).

    v1.8.0

    • Add optional support for the arbitrary crate (#275).

    v1.7.0

    • new_const and from_const constructors for creating a SmallVec in const contexts. Requires Rust 1.51 and the optional const_new feature. (#265)

    v1.6.1

    • Fix a possible buffer overflow in insert_many (#252, #254).

    v1.6.0

    • The "union" feature is now compatible with stable Rust 1.49 (#248, #247).
    • Fixed warnings when compiling with Rust 1.51 nightly (#242, #246).

    v1.5.1

    • Improve performance of push (#241).

    v1.5.0

    • Add the append method (#237).
    • Add support for more array sizes between 17 and 31 (#234).
    • Don't panic on deserialization errors (#238).

    v1.4.2

    • insert_many no longer leaks elements if the provided iterator panics (#213).
    • The unstable const_generics and specialization features are updated to work with the most recent nightly Rust toolchain (#232).
    • Internal code cleanup (#229, #231).

    v1.4.1

    • Don't allocate when the size of the element type is zero. Allocating zero bytes is undefined behavior. (#228)

    v1.4.0

    • Add try_reserve, try_reserve_exact, and try_grow methods (#214).

    v1.3.0

    • Add a new unstable const_generics feature (#204).
    • Improve inlining of constructor functions (#206).
    • Add a slice.to_smallvec() convenience method (#203).
    • Documentation and testing improvements.

    ... (truncated)

    Commits
    • c0766a0 Version 1.10.0
    • aa7e2cb Skip tests on 1.36
    • b960b3a Mark Array::size() as inline
    • e01054b Fix broken CI yaml script. Ensure a default value exists for the os matrix ...
    • 09b4988 Add Natvis definitions and tests for SmallVec type with and without the `unio...
    • 7fa951f Version 1.9.0
    • e9c2f0a Add retain_mut method (as an alias to retain)
    • 4ce5e16 Version 1.8.1
    • 7f9e513 Add a benchmark for the insert case where index == len.
    • b233568 Optimize insert for the case where index == len.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Cannot build on MacOS - error: could not find native static library `kernelaarch64-apple-darwin`, perhaps an -L flag is missing?

    Cannot build on MacOS - error: could not find native static library `kernelaarch64-apple-darwin`, perhaps an -L flag is missing?

    Describe the bug Kajiya does not compile on macOS Monterey on M1 Air To Reproduce Steps to reproduce the behavior:

    1. Clone main branch on m1 Mac
    2. Run command:

    cargo run --bin view --release

    1. See error: could not find native static library kernelaarch64-apple-darwin, perhaps an -L flag is missing?

    Expected behavior Kajiya compiles successfully on M1 Mac

    Screenshots image

    Device:

    • OS: macOS Monterey 12.3
    • CPU - Apple M1
    • RAM - 8GB
    • Rust - rust 1.65.0 Nov 2nd - stable-aarch64-apple-darwin toolchain
    bug help wanted 
    opened by AlexanderKyron 3
  • The sun's center has a darker spot in reflections

    The sun's center has a darker spot in reflections

    Describe the bug When looking at the sun through a reflection, the sun's center has a black pixel. After attaching Nsight, I saw that the light_gbuffer.hlsl shader outputs inf for the pixel in the center of the sun's reflection.

    I 'fixed' it by clamping the shader output between zero and a large value, but I don't properly understand all the PBR shader code so I don't know a more correct way of fixing it.

    To Reproduce

    1. Go to this commit on main: 6145eaaa1814047cc544be53adb8eb6cc348948d (the latest at the time of submitting this bug report)
    2. Load a model with a mirror-like reflective surface (I used the car.ron scene)
    3. Rotate the sun so that it's visible in the reflection
    4. The sun has a dark spot in the center.

    Expected behavior The sun's center should not have a darker spot like that.

    Screenshots image image

    Device:

    • OS: Windows 11
    • OS version: 21H2 build 22000.739
    • GPU: 3080 Ti
    • GPU driver version: 516.59
    • rust version: rustc 1.64.0-nightly (ddcbba036 2022-06-29)
    • cargo version: cargo 1.64.0-nightly (dbff32b27 2022-06-24)
    bug 
    opened by SeppahBaws 0
Owner
Embark
The future belongs to the curious
Embark
♾️ A multithreaded fractal renderer in Rust

fractal.rs A multithreaded fractal renderer in Rust Online release The live wasm-compiled release is accessible here. Due to some rust wasm compiler l

Bertrand 16 Aug 26, 2022
A Vulkan renderer for egui using Ash.

egui-ash-renderer A Vulkan renderer for egui using Ash. This is meant to add support for egui in your existing Vulkan/ash applications. Not a full efr

Adrien Bennadji 4 Apr 10, 2024
Experimental embedder for Flutter

NativeShell (Experimental embedder for Flutter) Features Leverages existing Flutter desktop embedder on each platform Unlike Flutter desktop embedders

NativeShell 552 Dec 31, 2022
Experimental package manager/system configurator for system hoppers

mascara An experimental package manager/config initializer tool for system hoppers. mascara.toml [mascara] feature = "Debian" logs = { stdout = "blue"

Ethan Gallucci 1 Apr 15, 2022
This is a demo Library of fltk-rs, which is used to learn various new gadgets of experimental fltk-rs.

fltk-rs Demo This is a demo Library of fltk-rs, which is used to learn various new gadgets of experimental fltk-rs. Demos demo9 Demo9 is an applicatio

WumaCoder 6 Dec 28, 2022
Integrate Qml and Rust by building the QMetaObject at compile time.

QMetaObject crate for Rust The qmetaobject crate is a crate which is used to expose rust object to Qt and QML. Objectives Rust procedural macro (custo

Woboq GmbH 495 Jan 3, 2023
bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy

Bevy Voxel Cone Tracing bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy. Bevy Version

研究社交 208 Dec 27, 2022
The Polkadot Hackathon Global Series North America edition is the second in a series of hackathons that brings the cutting edge of blockchain to a global community.

Polkadot Hackathon Project We are translating Uniswap v2 to Ink. Dependencies Install cargo-contract for building Ink contracts: cargo install dylint-

Kristiyan Dilov 3 Jun 28, 2022
An experimental real-time operating system (RTOS) written in Rust

An experimental real-time operating system (RTOS) written in Rust

null 0 Nov 14, 2022
Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis

OnTimeDB Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis OnTimeDB is a time

Stuart 2 Apr 5, 2022
Materialize simplifies application development with streaming data. Incrementally-updated materialized views - in PostgreSQL and in real time. Materialize is powered by Timely Dataflow.

Materialize is a streaming database for real-time applications. Get started Check out our getting started guide. About Materialize lets you ask questi

Materialize, Inc. 4.7k Jan 8, 2023
Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL

Skybase The next-generation NoSQL database What is Skybase? Skybase (or SkybaseDB/SDB) is an effort to provide the best of key/value stores, document

Skybase 1.4k Dec 29, 2022
A version of `sort | uniq -c` with output that updates in real-time as each line is parsed

uniqtoo A version of sort | uniq -c with output that updates in real-time as each line is parsed. Usage Pipe something line-based into uniqtoo the sam

Jake Wharton 62 Oct 14, 2022
A collection of filters for real-time audio processing

Audio Filters A collection of filters for real-time audio processing Feature Progress #![no_std] (via libm) f32 & f64 capable (via num-traits) SIMD Do

null 42 Nov 5, 2022
Dark Forest, the world's first decentralized real-time strategy game.

darkforest-rs Dark Forest, the world's first decentralized real-time strategy game.

null 44 Oct 9, 2022
A real-time implementation of "Ray Tracing in One Weekend" using nannou and rust-gpu.

Real-time Ray Tracing with nannou & rust-gpu An attempt at a real-time implementation of "Ray Tracing in One Weekend" by Peter Shirley. This was a per

null 89 Dec 23, 2022
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, written in Rust

Datafuse Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture Datafuse is a Real-Time Data Processing & Analytics DBMS wit

Datafuse Labs 5k Jan 4, 2023
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Datafuse Labs 5k Jan 9, 2023
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Datafuse Labs 5k Jan 9, 2023
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

Skytable 1.4k Dec 29, 2022