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

FRAC_4_PI

#
const FRAC_4_PI: f32 = 0.07957747154594767

Bindings

volumetric_fog

#
@group(1)
@binding(0)
var<uniform> volumetric_fog: VolumetricFog

depth_texture

#
@if(MULTISAMPLED)
@group(1)
@binding(1)
var depth_texture: texture_depth_multisampled_2d
@else()
@group(1)
@binding(1)
var depth_texture: texture_depth_2d

density_texture

#
@group(1)
@binding(2)
var density_texture: texture_3d<f32>

density_sampler

#
@group(1)
@binding(3)
var density_sampler: sampler

Structures

VolumetricFog

#

The GPU version of [VolumetricFog]. See the comments in volumetric_fog/mod.rs for descriptions of the fields here.

struct VolumetricFog {
clip_from_local: mat4x4<f32> ,
uvw_from_world: mat4x4<f32> ,
far_planes: array<vec4<f32>, 6> ,
fog_color: vec3<f32> ,
light_tint: vec3<f32> ,
ambient_color: vec3<f32> ,
ambient_intensity: f32 ,
step_count: u32 ,
bounding_radius: f32 ,
absorption: f32 ,
scattering: f32 ,
density_factor: f32 ,
density_texture_offset: vec3<f32> ,
scattering_asymmetry: f32 ,
light_intensity: f32 ,
jitter_strength: f32 ,
}

Vertex

#
struct Vertex {
@builtin(instance_index)
instance_index: u32 ,
@location(0)
position: vec3<f32> ,
}

Functions

vertex

#
@vertex
Processes each 3D point in a model before it's drawn
fn vertex (
vertex: Vertex
) ->
@builtin(position)
vec4<f32>

henyey_greenstein

#
fn henyey_greenstein (
neg_LdotV: f32
) -> f32

fragment

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment (
@builtin(position)
position: vec4<f32>
) ->
@location(0)
vec4<f32>

fetch_point_shadow_without_normal

#
fn fetch_point_shadow_without_normal (
light_id: u32
, 
frag_position: vec4<f32>
, 
frag_coord_xy: vec2<f32>
) -> f32

fetch_spot_shadow_without_normal

#
fn fetch_spot_shadow_without_normal (
light_id: u32
, 
frag_position: vec4<f32>
, 
frag_coord_xy: vec2<f32>
) -> f32

sample_transmittance_lut

#
fn sample_transmittance_lut (
r: f32
, 
mu: f32
) -> vec3<f32>
Contents