Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.

Constants

PHI_2

#
const PHI_2: vec2<f32> = vec2(1.3247179572447460259609088, 1.7548776662466927600495087)

Bindings

multiscattering_lut_out

#
@group(0)
@binding(13)
var multiscattering_lut_out: texture_storage_2d<rgba16float, write>

Structures

MultiscatteringSample

#
struct MultiscatteringSample {
l_2: vec3<f32> ,
f_ms: vec3<f32> ,
}

Functions

s2_sequence

#
fn s2_sequence (
n: u32
) -> vec2<f32>

uv_to_sphere

#

Lambert equal-area projection.

fn uv_to_sphere (
uv: vec2<f32>
) -> vec3<f32>

main

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(1, 1, 64)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn main (
@builtin(global_invocation_id)
global_id: vec3<u32>
)

sample_multiscattering_dir

#
fn sample_multiscattering_dir (
r: f32
, 
ray_dir: vec3<f32>
, 
light_dir: vec3<f32>
) -> MultiscatteringSample
Contents