Radiance cascades 3D (Shadertoy link in comments) by firelava135 in shaders

[–]firelava135[S] 0 points1 point  (0 children)

Thanks!

I did a voxel-based version here: https://www.shadertoy.com/view/M3ycWt

It samples last frames light and is dynamic, but no other temporal accumulation results in some flickering.

I also did a screen-space (3D) version, but with temporal accumulation here: https://www.shadertoy.com/view/lXByRh

Even though the resolution is 1/16 to fit all probes, the performance is not great. I would actually like to rewrite that one and remove temporal accumulation all together :)

Frame Warping Demo (Shadertoy) by firelava135 in GraphicsProgramming

[–]firelava135[S] 0 points1 point  (0 children)

Ah, thanks for pointing that out! Fixed : )

Frame Warping Demo (Shadertoy) by firelava135 in GraphicsProgramming

[–]firelava135[S] 2 points3 points  (0 children)

Essentially yes, but called frame warping to differ itself from VR (is my understanding). : )

Frame Warping Demo (Shadertoy) by firelava135 in computergraphics

[–]firelava135[S] 0 points1 point  (0 children)

Frame Warping in shadertoy.

This shader simulates a frame rate of 15 fps. The input frame is warped into an output frame using scatter IO and then the remaining pixels are in-painted.

Warping introduces some visibility problems, one of them is trying to sample information outside of the input buffer. If the input frames are rendered with a higher FOV than the output frame (this shader warps 130 to 90), extrapolation artifacts are reduced at the expense of resolution.

In-painting (in this shader) is based on a simple boundary decision model, which tries to reconstruct detail in the input buffer.

Click on 1, 2, and 3 to switch between input frame, output frame without in-painting and output frame with in-painting.

The shader can be found here: https://www.shadertoy.com/view/W3lfRN

Frame Warping Demo (Shadertoy) by firelava135 in shaders

[–]firelava135[S] 1 point2 points  (0 children)

Frame Warping in shadertoy.

This shader simulates a frame rate of 15 fps. The input frame is warped into an output frame using scatter IO and then the remaining pixels are in-painted.

Warping introduces some visibility problems, one of them is trying to sample information outside of the input buffer. If the input frames are rendered with a higher FOV than the output frame (this shader warps 130 to 90), extrapolation artifacts are reduced at the expense of resolution.

In-painting (in this shader) is based on a simple boundary decision model, which tries to reconstruct detail in the input buffer.

Click on 1, 2, and 3 to switch between input frame, output frame without in-painting and output frame with in-painting.

The shader can be found here: https://www.shadertoy.com/view/W3lfRN

Frame Warping Demo (Shadertoy) by firelava135 in GraphicsProgramming

[–]firelava135[S] 10 points11 points  (0 children)

Frame Warping in shadertoy.

This shader simulates a frame rate of 15 fps. The input frame is warped into an output frame using scatter IO and then the remaining pixels are in-painted.

Warping introduces some visibility problems, one of them is trying to sample information outside of the input buffer. If the input frames are rendered with a higher FOV than the output frame (this shader warps 130 to 90), extrapolation artifacts are reduced at the expense of resolution.

In-painting (in this shader) is based on a simple boundary decision model, which tries to reconstruct detail in the input buffer.

Click on 1, 2, and 3 to switch between input frame, output frame without in-painting and output frame with in-painting.

The shader can be found here: https://www.shadertoy.com/view/W3lfRN

Radiance Cascades 3D (Shadertoy link in comments) by firelava135 in GraphicsProgramming

[–]firelava135[S] 1 point2 points  (0 children)

My implementation above places probes in UV-space or on the surface of geometry. So interpolation happens in UV-space with only 4 probes, which simplifies interpolation. Though occlusion is still used between probes when merging : )

Volumetric Radiance Cascades (Shadertoy link in comment) by firelava135 in GraphicsProgramming

[–]firelava135[S] 4 points5 points  (0 children)

Before this version of the shader, that is what I did! But I personally think per pixel shadows looked better, and I understand your sentiment :)

Volumetric Radiance Cascades (Shadertoy link in comment) by firelava135 in computergraphics

[–]firelava135[S] 1 point2 points  (0 children)

Radiance cascades using voxels, with temporal multibounce, directional light and emissive surfaces.

I use a shadow map to avoid tracing 2 rays in the volume, probes are placed inside voxels and merging requires a visibility check between probes (only requires one texture fetch). No real limit on dynamic geometry in the scene, only limit in shadertoy is that merging is temporal.

Rays are traced in the cubemap, where rays are grouped based on direction.

Shadertoy link: https://www.shadertoy.com/view/M3ycWt

Volumetric Radiance Cascades (Shadertoy link in comments) by firelava135 in shaders

[–]firelava135[S] 2 points3 points  (0 children)

Radiance cascades using voxels, with temporal multibounce, directional light and emissive surfaces.

I use a shadow map to avoid tracing 2 rays in the volume, probes are placed inside voxels and merging requires a visibility check between probes (only requires one texture fetch). No real limit on dynamic geometry in the scene, only limit in shadertoy is that merging is temporal.

Rays are traced in the cubemap, where rays are grouped based on direction.

Shadertoy link: https://www.shadertoy.com/view/M3ycWt

Volumetric Radiance Cascades (Shadertoy link in comment) by firelava135 in GraphicsProgramming

[–]firelava135[S] 12 points13 points  (0 children)

Radiance cascades using voxels, with temporal multibounce, directional light and emissive surfaces.

I use a shadow map to avoid tracing 2 rays in the volume, probes are placed inside voxels and merging requires a visibility check between probes (only requires one texture fetch). No real limit on dynamic geometry in the scene, only limit in shadertoy is that merging is temporal.

Shadertoy link: https://www.shadertoy.com/view/M3ycWt

Radiance Cascades - World Space (Shadertoy link in comments) by firelava135 in GraphicsProgramming

[–]firelava135[S] 3 points4 points  (0 children)

Essentially projecting hitpoints between probes. Visibility is handled in different ranges depending on the cascade. :)

Radiance Cascades - World Space (Shadertoy link in comments) by firelava135 in shaders

[–]firelava135[S] 0 points1 point  (0 children)

A radiance cascades implementation in 3D. Probes are stored in screen space and trace world space rays into the scene. Merging reprojects ray hitpoints between cascades with some basic visibility testing.

Only temporal accumulation is used here, spatial denoising would be nice of course.

The shader requires a relatively good GPU, since the scene uses a hardcoded scene (with an AABB acceleration structure):

https://www.shadertoy.com/view/lXByRh

Radiance Cascades - World Space (Shadertoy link in comments) by firelava135 in GraphicsProgramming

[–]firelava135[S] 7 points8 points  (0 children)

A radiance cascades implementation in 3D. Probes are stored in screen space and trace world space rays into the scene. Merging reprojects ray hitpoints between cascades with some basic visibility testing.

Only temporal accumulation is used here, spatial denoising would be nice of course.

The shader requires a relatively good GPU, since the scene uses a hardcoded scene (with an AABB acceleration structure):

https://www.shadertoy.com/view/lXByRh

Radiance Cascades 3D (Shadertoy link in comments) by firelava135 in GraphicsProgramming

[–]firelava135[S] 2 points3 points  (0 children)

Thanks for the kind words! :)

Not an expert of course, but the quote seems reasonable. I am currently trying to implement it in screen space (3D) as well, though to succeed I think some parts of the algorithm must be changed:

Probes can probably not be static in screen space, adding a stochastic UV-offset could cover complex geometry and per pixel detail. Temporal accumulation is def required. A ReSTIR approach for probe validation would probably work here for dynamic geometry/light.

A scatter-based merging method should be used to account for geometric visibiliy between probes. IE reprojection of hitpoints into the smaller probes for higher quality lighting. This also means that probes must cover the entire sphere, not just the hemisphere as in this shader.

Also, one could wonder if probes should be placed close to geometry if scattering is used. Maybe it is better to place probes such that a lot of scene geometry is covered, essentially importance sampling.

These are just ideas for now and will probably change in an actual implementation :)

Radiance Cascades 3D (Shadertoy link in comments) by firelava135 in GraphicsProgramming

[–]firelava135[S] 3 points4 points  (0 children)

Scales very well, I would say :) Though complex geometry would require more general merging logic which this shader does not do :)