Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

pbr_reduced.wgsl

Constants

pbr_types__STANDARD_MATERIAL_FLAGS_EMISSIVE_TEXTURE_BIT

#
const pbr_types__STANDARD_MATERIAL_FLAGS_EMISSIVE_TEXTURE_BIT: u32 = 2u

pbr_types__STANDARD_MATERIAL_FLAGS_UNLIT_BIT

#
const pbr_types__STANDARD_MATERIAL_FLAGS_UNLIT_BIT: u32 = 32u

pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_BLEND

#
const pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_BLEND: u32 = 256u

pbr_types__STANDARD_MATERIAL_FLAGS_TWO_COMPONENT_NORMAL_MAP

#
const pbr_types__STANDARD_MATERIAL_FLAGS_TWO_COMPONENT_NORMAL_MAP: u32 = 512u

pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_MASK

#
const pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_MASK: u32 = 128u

pbr_types__STANDARD_MATERIAL_FLAGS_DOUBLE_SIDED_BIT

#
const pbr_types__STANDARD_MATERIAL_FLAGS_DOUBLE_SIDED_BIT: u32 = 16u

pbr_types__STANDARD_MATERIAL_FLAGS_BASE_COLOR_TEXTURE_BIT

#
const pbr_types__STANDARD_MATERIAL_FLAGS_BASE_COLOR_TEXTURE_BIT: u32 = 1u

pbr_types__STANDARD_MATERIAL_FLAGS_METALLIC_ROUGHNESS_TEXTURE_BIT

#
const pbr_types__STANDARD_MATERIAL_FLAGS_METALLIC_ROUGHNESS_TEXTURE_BIT: u32 = 4u

pbr_types__STANDARD_MATERIAL_FLAGS_OCCLUSION_TEXTURE_BIT

#
const pbr_types__STANDARD_MATERIAL_FLAGS_OCCLUSION_TEXTURE_BIT: u32 = 8u

pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_OPAQUE

#
const pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_OPAQUE: u32 = 64u

pbr_types__STANDARD_MATERIAL_FLAGS_FLIP_NORMAL_MAP_Y

#
const pbr_types__STANDARD_MATERIAL_FLAGS_FLIP_NORMAL_MAP_Y: u32 = 1024u

mesh_types__MESH_FLAGS_SHADOW_RECEIVER_BIT

#
const mesh_types__MESH_FLAGS_SHADOW_RECEIVER_BIT: u32 = 1u

mesh_view_types__POINT_LIGHT_FLAGS_SPOT_LIGHT_Y_NEGATIVE

#
const mesh_view_types__POINT_LIGHT_FLAGS_SPOT_LIGHT_Y_NEGATIVE: u32 = 2u

mesh_view_types__DIRECTIONAL_LIGHT_FLAGS_SHADOWS_ENABLED_BIT

#
const mesh_view_types__DIRECTIONAL_LIGHT_FLAGS_SHADOWS_ENABLED_BIT: u32 = 1u

mesh_view_types__POINT_LIGHT_FLAGS_SHADOWS_ENABLED_BIT

#
const mesh_view_types__POINT_LIGHT_FLAGS_SHADOWS_ENABLED_BIT: u32 = 1u

utils__PI

#
const utils__PI: f32 = 3.1415927410125732

clustered_forward__CLUSTER_COUNT_SIZE

#
const clustered_forward__CLUSTER_COUNT_SIZE: u32 = 9u

Bindings

mesh_bindings__mesh

#
@group(2)
@binding(0)
var<uniform> mesh_bindings__mesh: mesh_types__Mesh

mesh_view_bindings__view

#
@group(0)
@binding(0)
var<uniform> mesh_view_bindings__view: mesh_view_types__View

mesh_view_bindings__point_shadow_textures

#
@group(0)
@binding(2)
var mesh_view_bindings__point_shadow_textures: texture_depth_cube_array

mesh_view_bindings__directional_shadow_textures_sampler

#
@group(0)
@binding(5)
var mesh_view_bindings__directional_shadow_textures_sampler: sampler_comparison

mesh_view_bindings__point_lights

#
@group(0)
@binding(6)
var<storage> mesh_view_bindings__point_lights: mesh_view_types__PointLights

mesh_view_bindings__lights

#
@group(0)
@binding(1)
var<uniform> mesh_view_bindings__lights: mesh_view_types__Lights

mesh_view_bindings__point_shadow_textures_sampler

#
@group(0)
@binding(3)
var mesh_view_bindings__point_shadow_textures_sampler: sampler_comparison

mesh_view_bindings__directional_shadow_textures

#
@group(0)
@binding(4)
var mesh_view_bindings__directional_shadow_textures: texture_depth_2d_array

mesh_view_bindings__cluster_light_index_lists

#
@group(0)
@binding(7)
var<storage> mesh_view_bindings__cluster_light_index_lists: mesh_view_types__ClusterLightIndexLists

mesh_view_bindings__cluster_offsets_and_counts

#
@group(0)
@binding(8)
var<storage> mesh_view_bindings__cluster_offsets_and_counts: mesh_view_types__ClusterOffsetsAndCounts

pbr_bindings__occlusion_sampler

#
@group(1)
@binding(8)
var pbr_bindings__occlusion_sampler: sampler

pbr_bindings__material

#
@group(1)
@binding(0)
var<uniform> pbr_bindings__material: pbr_types__StandardMaterial

pbr_bindings__emissive_texture

#
@group(1)
@binding(3)
var pbr_bindings__emissive_texture: texture_2d<f32>

pbr_bindings__base_color_texture

#
@group(1)
@binding(1)
var pbr_bindings__base_color_texture: texture_2d<f32>

pbr_bindings__metallic_roughness_texture

#
@group(1)
@binding(5)
var pbr_bindings__metallic_roughness_texture: texture_2d<f32>

pbr_bindings__emissive_sampler

#
@group(1)
@binding(4)
var pbr_bindings__emissive_sampler: sampler

pbr_bindings__metallic_roughness_sampler

#
@group(1)
@binding(6)
var pbr_bindings__metallic_roughness_sampler: sampler

pbr_bindings__base_color_sampler

#
@group(1)
@binding(2)
var pbr_bindings__base_color_sampler: sampler

pbr_bindings__normal_map_sampler

#
@group(1)
@binding(10)
var pbr_bindings__normal_map_sampler: sampler

pbr_bindings__normal_map_texture

#
@group(1)
@binding(9)
var pbr_bindings__normal_map_texture: texture_2d<f32>

pbr_bindings__occlusion_texture

#
@group(1)
@binding(7)
var pbr_bindings__occlusion_texture: texture_2d<f32>

Structures

mesh_vertex_output__MeshVertexOutput

#
struct mesh_vertex_output__MeshVertexOutput {
@location(0)
world_position: vec4<f32> ,
@location(1)
world_normal: vec3<f32> ,
@location(2)
uv: vec2<f32> ,
}

pbr_types__StandardMaterial

#
struct pbr_types__StandardMaterial {
base_color: vec4<f32> ,
emissive: vec4<f32> ,
perceptual_roughness: f32 ,
metallic: f32 ,
reflectance: f32 ,
flags: u32 ,
alpha_cutoff: f32 ,
}

mesh_types__Mesh

#
struct mesh_types__Mesh {
model: mat4x4<f32> ,
inverse_transpose_model: mat4x4<f32> ,
flags: u32 ,
}

mesh_view_types__View

#
struct mesh_view_types__View {
view_proj: mat4x4<f32> ,
inverse_view_proj: mat4x4<f32> ,
inverse_view: mat4x4<f32> ,
projection: mat4x4<f32> ,
inverse_projection: mat4x4<f32> ,
world_position: vec3<f32> ,
width: f32 ,
height: f32 ,
}

mesh_view_types__PointLight

#
struct mesh_view_types__PointLight {
light_custom_data: vec4<f32> ,
color_inverse_square_range: vec4<f32> ,
position_radius: vec4<f32> ,
flags: u32 ,
shadow_depth_bias: f32 ,
shadow_normal_bias: f32 ,
spot_light_tan_angle: f32 ,
}

mesh_view_types__DirectionalLight

#
struct mesh_view_types__DirectionalLight {
view_projection: mat4x4<f32> ,
color: vec4<f32> ,
direction_to_light: vec3<f32> ,
flags: u32 ,
shadow_depth_bias: f32 ,
shadow_normal_bias: f32 ,
}

mesh_view_types__Lights

#
struct mesh_view_types__Lights {
ambient_color: vec4<f32> ,
cluster_dimensions: vec4<u32> ,
cluster_factors: vec4<f32> ,
n_directional_lights: u32 ,
spot_light_shadowmap_offset: i32 ,
}

mesh_view_types__PointLights

#
struct mesh_view_types__PointLights { }

mesh_view_types__ClusterLightIndexLists

#
struct mesh_view_types__ClusterLightIndexLists {
data: array<u32> ,
}

mesh_view_types__ClusterOffsetsAndCounts

#
struct mesh_view_types__ClusterOffsetsAndCounts { }

pbr_functions__PbrInput

#
struct pbr_functions__PbrInput {
occlusion: f32 ,
frag_coord: vec4<f32> ,
world_position: vec4<f32> ,
world_normal: vec3<f32> ,
is_orthographic: bool ,
}

Functions

pbr_functions__pbr

#
fn pbr_functions__pbr ( ) -> vec4<f32>

fragment

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