specular_gi.wgsl
Import path
Constants
Bindings
@group(1)
@binding(0)
var
view_output:
texture_storage_2d<rgba16float, read_write>
@group(1)
@binding(7)
var
gbuffer:
texture_2d<u32>
@group(1)
@binding(8)
var
depth_buffer:
texture_depth_2d
Structures
Functions
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(8, 8, 1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn
nee_mis_weight
(
inverse_p_light:
f32
,
brdf_rays_can_hit:
bool
,
wo_tangent:
vec3<f32>
,
wi:
vec3<f32>
,
ray_hit:
ResolvedRayHitFull
,
TBN:
mat3x3<f32>
)
->
f32
Don’t adjust the size of this struct without also adjusting GI_RESERVOIR_STRUCT_SIZE.