TEXTURE_MAP_NONE
#
const
TEXTURE_MAP_NONE:
u32
=
0xFFFFFFFFu
MIRROR_ROUGHNESS_THRESHOLD
#
LIGHT_SOURCE_KIND_EMISSIVE_MESH
#
const
LIGHT_SOURCE_KIND_EMISSIVE_MESH:
u32
=
0u
LIGHT_SOURCE_KIND_DIRECTIONAL
#
const
LIGHT_SOURCE_KIND_DIRECTIONAL:
u32
=
1u
LIGHT_NOT_PRESENT_THIS_FRAME
#
const
LIGHT_NOT_PRESENT_THIS_FRAME:
u32
=
0xFFFFFFFFu
RAY_T_MIN
#
RAY_T_MAX
#
RAY_NO_CULL
#
const
RAY_NO_CULL:
u32
=
0xFFu
vertex_buffers
#
@group (0 )
@binding (0 )
var <storage >
vertex_buffers:
binding_array<
VertexBuffer >
index_buffers
#
@group (0 )
@binding (1 )
var <storage >
index_buffers:
binding_array<
IndexBuffer >
textures
#
@group (0 )
@binding (2 )
var
textures:
binding_array<
texture_2d <
f32 >>
samplers
#
@group (0 )
@binding (3 )
var
samplers:
binding_array<
sampler >
materials
#
tlas
#
@group (0 )
@binding (5 )
var
tlas:
acceleration_structure
previous_frame_tlas
#
@group (0 )
@binding (6 )
var
previous_frame_tlas:
acceleration_structure
geometry_ids
#
material_ids
#
@group (0 )
@binding (10 )
var <storage >
material_ids:
array <
u32 >
light_sources
#
directional_lights
#
previous_frame_light_id_translations
#
@group (0 )
@binding (13 )
var <storage >
previous_frame_light_id_translations:
array <
u32 >
brdf_dfg_lut
#
brdf_dfg_lut_sampler
#
@group (0 )
@binding (15 )
var
brdf_dfg_lut_sampler:
sampler
environment_map
#
environment_map_sampler
#
@group (0 )
@binding (17 )
var
environment_map_sampler:
sampler
environment_map_light
#
InstanceGeometryIds
#
struct
InstanceGeometryIds
{
vertex_buffer_offset:
u32
,
index_buffer_offset:
u32
,
}
VertexBuffer
#
IndexBuffer
#
PackedVertex
#
Vertex
#
Material
#
struct
Material
{
normal_map_texture_id:
u32
,
base_color_texture_id:
u32
,
emissive_texture_id:
u32
,
metallic_roughness_texture_id:
u32
,
perceptual_roughness:
f32
,
}
LightSource
#
DirectionalLight
#
struct
DirectionalLight
{
}
EnvironmentMapLight
#
struct
EnvironmentMapLight
{
}
ResolvedMaterial
#
struct
ResolvedMaterial
{
perceptual_roughness:
f32
,
}
ResolvedRayHitFull
#
struct
ResolvedRayHitFull
{
previous_frame_world_position:
vec3 <
f32 >
,
geometric_world_normal:
vec3 <
f32 >
,
}
unpack_vertex
#
fn
unpack_vertex
(
)
->
Vertex
trace_ray
#
fn
trace_ray
(
,
,
,
,
)
->
RayIntersection
trace_ray_previous_frame
#
fn
trace_ray_previous_frame
(
,
,
,
,
)
->
RayIntersection
sample_texture
#
fn
sample_texture
(
,
)
->
vec3 <
f32 >
resolve_material
#
resolve_ray_hit_full
#
load_vertices
#
resolve_triangle_data_full
#
Contents