1struct mesh_vertex_output__MeshVertexOutput { 2 @location(0) world_position: vec4<f32>, 3 @location(1) world_normal: vec3<f32>, 4 @location(2) uv: vec2<f32>, 7struct pbr_types__StandardMaterial { 10 perceptual_roughness: f32, 17struct mesh_types__Mesh { 19 inverse_transpose_model: mat4x4<f32>, 23struct mesh_view_types__View { 24 view_proj: mat4x4<f32>, 25 inverse_view_proj: mat4x4<f32>, 27 inverse_view: mat4x4<f32>, 28 projection: mat4x4<f32>, 29 inverse_projection: mat4x4<f32>, 30 world_position: vec3<f32>, 35struct mesh_view_types__PointLight { 36 light_custom_data: vec4<f32>, 37 color_inverse_square_range: vec4<f32>, 38 position_radius: vec4<f32>, 40 shadow_depth_bias: f32, 41 shadow_normal_bias: f32, 42 spot_light_tan_angle: f32, 45struct mesh_view_types__DirectionalLight { 46 view_projection: mat4x4<f32>, 48 direction_to_light: vec3<f32>, 50 shadow_depth_bias: f32, 51 shadow_normal_bias: f32, 54struct mesh_view_types__Lights { 55 directional_lights: array<mesh_view_types__DirectionalLight,1u>, 56 ambient_color: vec4<f32>, 57 cluster_dimensions: vec4<u32>, 58 cluster_factors: vec4<f32>, 59 n_directional_lights: u32, 60 spot_light_shadowmap_offset: i32, 63struct mesh_view_types__PointLights { 64 data: array<mesh_view_types__PointLight>, 67struct mesh_view_types__ClusterLightIndexLists { 71struct mesh_view_types__ClusterOffsetsAndCounts { 72 data: array<vec4<u32>>, 75struct pbr_functions__PbrInput { 76 material: pbr_types__StandardMaterial, 78 frag_coord: vec4<f32>, 79 world_position: vec4<f32>, 80 world_normal: vec3<f32>, 83 is_orthographic: bool, 86const pbr_types__STANDARD_MATERIAL_FLAGS_EMISSIVE_TEXTURE_BIT: u32 = 2u; 88const pbr_types__STANDARD_MATERIAL_FLAGS_UNLIT_BIT: u32 = 32u; 90const pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_BLEND: u32 = 256u; 92const pbr_types__STANDARD_MATERIAL_FLAGS_TWO_COMPONENT_NORMAL_MAP: u32 = 512u; 94const pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_MASK: u32 = 128u; 96const pbr_types__STANDARD_MATERIAL_FLAGS_DOUBLE_SIDED_BIT: u32 = 16u; 98const pbr_types__STANDARD_MATERIAL_FLAGS_BASE_COLOR_TEXTURE_BIT: u32 = 1u; 100const pbr_types__STANDARD_MATERIAL_FLAGS_METALLIC_ROUGHNESS_TEXTURE_BIT: u32 = 4u; 102const pbr_types__STANDARD_MATERIAL_FLAGS_OCCLUSION_TEXTURE_BIT: u32 = 8u; 104const pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_OPAQUE: u32 = 64u; 106const pbr_types__STANDARD_MATERIAL_FLAGS_FLIP_NORMAL_MAP_Y: u32 = 1024u; 108const mesh_types__MESH_FLAGS_SHADOW_RECEIVER_BIT: u32 = 1u; 110const mesh_view_types__POINT_LIGHT_FLAGS_SPOT_LIGHT_Y_NEGATIVE: u32 = 2u; 112const mesh_view_types__DIRECTIONAL_LIGHT_FLAGS_SHADOWS_ENABLED_BIT: u32 = 1u; 114const mesh_view_types__POINT_LIGHT_FLAGS_SHADOWS_ENABLED_BIT: u32 = 1u; 116const utils__PI: f32 = 3.1415927410125732; 118const clustered_forward__CLUSTER_COUNT_SIZE: u32 = 9u; 121var<uniform> mesh_bindings__mesh: mesh_types__Mesh; 123var<uniform> mesh_view_bindings__view: mesh_view_types__View; 125var mesh_view_bindings__point_shadow_textures: texture_depth_cube_array; 127var mesh_view_bindings__directional_shadow_textures_sampler: sampler_comparison; 129var<storage> mesh_view_bindings__point_lights: mesh_view_types__PointLights; 131var<uniform> mesh_view_bindings__lights: mesh_view_types__Lights; 133var mesh_view_bindings__point_shadow_textures_sampler: sampler_comparison; 135var mesh_view_bindings__directional_shadow_textures: texture_depth_2d_array; 137var<storage> mesh_view_bindings__cluster_light_index_lists: mesh_view_types__ClusterLightIndexLists; 139var<storage> mesh_view_bindings__cluster_offsets_and_counts: mesh_view_types__ClusterOffsetsAndCounts; 141var pbr_bindings__occlusion_sampler: sampler; 143var<uniform> pbr_bindings__material: pbr_types__StandardMaterial; 145var pbr_bindings__emissive_texture: texture_2d<f32>; 147var pbr_bindings__base_color_texture: texture_2d<f32>; 149var pbr_bindings__metallic_roughness_texture: texture_2d<f32>; 151var pbr_bindings__emissive_sampler: sampler; 153var pbr_bindings__metallic_roughness_sampler: sampler; 155var pbr_bindings__base_color_sampler: sampler; 156@group(1) @binding(10) 157var pbr_bindings__normal_map_sampler: sampler; 159var pbr_bindings__normal_map_texture: texture_2d<f32>; 161var pbr_bindings__occlusion_texture: texture_2d<f32>; 164fn pbr_functions__pbr(in: pbr_functions__PbrInput) -> vec4<f32> { 165 var output_color_2: vec4<f32>; 166 output_color_2 = in.material.base_color; 168 if ((in.material.flags & pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_OPAQUE) != 0u) { 169 output_color_2.w = 1.0; 171 if ((in.material.flags & pbr_types__STANDARD_MATERIAL_FLAGS_ALPHA_MODE_MASK) != 0u) { 172 let _e52: f32 = output_color_2.w; 173 if (_e52 >= in.material.alpha_cutoff) { 174 output_color_2.w = 1.0; 181 return output_color_2; 185fn fragment(mesh: mesh_vertex_output__MeshVertexOutput, @builtin(front_facing) is_front: bool, @builtin(position) frag_coord: vec4<f32>) -> @location(0) vec4<f32> { 186 var output_color: vec4<f32>; 187 var pbr_input: pbr_functions__PbrInput; 189 output_color = pbr_bindings__material.base_color; 191 if ((pbr_bindings__material.flags & pbr_types__STANDARD_MATERIAL_FLAGS_UNLIT_BIT) == 0u) { 192 pbr_input.material.base_color = output_color; 193 pbr_input.material.flags = pbr_bindings__material.flags; 194 pbr_input.material.metallic = 15.0; 195 pbr_input.V = vec3<f32>(1.0, 2.0, 3.0); 196 pbr_input.material.alpha_cutoff = pbr_bindings__material.alpha_cutoff; 198 output_color = pbr_functions__pbr(pbr_input);