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

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

#
Used by 1 shader in bevy_solari 0.19.1
const LIGHT_SOURCE_KIND_DIRECTIONAL: u32 = 1u

LIGHT_NOT_PRESENT_THIS_FRAME

#
Used by 1 shader in bevy_solari 0.19.1
const LIGHT_NOT_PRESENT_THIS_FRAME: u32 = 0xFFFFFFFFu

RAY_T_MIN

#

RAY_T_MAX

#

RAY_NO_CULL

#
const RAY_NO_CULL: u32 = 0xFFu

Bindings

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

#
@group(0)
@binding(4)
var<storage> materials: array<Material>

tlas

#
@group(0)
@binding(5)
var tlas: acceleration_structure

transforms

#
@group(0)
@binding(6)
var<storage> transforms: array<mat4x4<f32>>

previous_frame_transforms

#
@group(0)
@binding(7)
var<storage> previous_frame_transforms: array<mat4x4<f32>>

geometry_ids

#
@group(0)
@binding(8)
var<storage> geometry_ids: array<InstanceGeometryIds>

material_ids

#
@group(0)
@binding(9)
var<storage> material_ids: array<u32>

light_sources

#
@group(0)
@binding(10)
var<storage> light_sources: array<LightSource>

directional_lights

#
Used by 1 shader in bevy_solari 0.19.1
@group(0)
@binding(11)
var<storage> directional_lights: array<DirectionalLight>

previous_frame_light_id_translations

#
Used by 1 shader in bevy_solari 0.19.1
@group(0)
@binding(12)
var<storage> previous_frame_light_id_translations: array<u32>

brdf_dfg_lut

#
Used by 1 shader in bevy_solari 0.19.1
@group(0)
@binding(13)
var brdf_dfg_lut: texture_2d<f32>

brdf_dfg_lut_sampler

#
Used by 1 shader in bevy_solari 0.19.1
@group(0)
@binding(14)
var brdf_dfg_lut_sampler: sampler

Structures

InstanceGeometryIds

#
struct InstanceGeometryIds {
vertex_buffer_id: u32,
vertex_buffer_offset: u32,
index_buffer_id: u32,
index_buffer_offset: u32,
triangle_count: u32,
}

VertexBuffer

#
struct VertexBuffer {
vertices: array<PackedVertex>,
}

IndexBuffer

#
struct IndexBuffer {
indices: array<u32>,
}

PackedVertex

#
struct PackedVertex {
a: vec4<f32>,
b: vec4<f32>,
tangent: vec4<f32>,
}

Vertex

#
struct Vertex {
position: vec3<f32>,
normal: vec3<f32>,
uv: vec2<f32>,
tangent: vec4<f32>,
}

Material

#
struct Material {
normal_map_texture_id: u32,
base_color_texture_id: u32,
emissive_texture_id: u32,
metallic_roughness_texture_id: u32,
base_color: vec3<f32>,
perceptual_roughness: f32,
emissive: vec3<f32>,
metallic: f32,
_padding: vec3<f32>,
reflectance: f32,
}

LightSource

#
Used by 1 shader in bevy_solari 0.19.1
struct LightSource {
kind: u32,
id: u32,
}

DirectionalLight

#
struct DirectionalLight {
direction_to_light: vec3<f32>,
cos_theta_max: f32,
luminance: vec3<f32>,
inverse_pdf: f32,
}

ResolvedMaterial

#
struct ResolvedMaterial {
base_color: vec3<f32>,
emissive: vec3<f32>,
reflectance: f32,
perceptual_roughness: f32,
roughness: f32,
metallic: f32,
}

ResolvedRayHitFull

#
struct ResolvedRayHitFull {
world_position: vec3<f32>,
previous_frame_world_position: vec3<f32>,
world_normal: vec3<f32>,
geometric_world_normal: vec3<f32>,
world_tangent: vec4<f32>,
uv: vec2<f32>,
triangle_area: f32,
triangle_count: u32,
material: ResolvedMaterial,
}

Functions

unpack_vertex

#
fn unpack_vertex (
packed: PackedVertex
) -> Vertex

trace_ray

#
fn trace_ray (
ray_origin: vec3<f32>,
ray_direction: vec3<f32>,
ray_t_min: f32,
ray_t_max: f32,
ray_flag: u32
) -> RayIntersection

sample_texture

#
fn sample_texture (
id: u32,
uv: vec2<f32>
) -> vec3<f32>

resolve_material

#
fn resolve_material (
material: Material,
uv: vec2<f32>
) -> ResolvedMaterial

resolve_ray_hit_full

#

load_vertices

#
fn load_vertices (
instance_geometry_ids: InstanceGeometryIds,
triangle_id: u32
) -> array<Vertex, 3>

transform_positions

#
fn transform_positions (
transform: mat4x4<f32>,
vertices: array<Vertex, 3>
) -> array<vec3<f32>, 3>

resolve_triangle_data_full

#
Used by 1 shader in bevy_solari 0.19.1
fn resolve_triangle_data_full (
instance_id: u32,
triangle_id: u32,
barycentrics: vec3<f32>
) -> ResolvedRayHitFull
Contents