// Vertex shader struct CameraUniform { view: mat4x4, proj: mat4x4, position: vec4, } @group(0) @binding(0) var camera: CameraUniform; struct Light { position: vec3, color: vec4, matrices: array, 6>, active_matrix: u32, } @group(1) @binding(0) var light: Light; struct VertexInput { @location(0) position: vec3, @location(1) tex_coords: vec2, @location(2) normal: vec3, @location(3) tangent: vec3, @location(4) bitangent: vec3, } struct InstanceInput { @location(5) model_matrix_0: vec4, @location(6) model_matrix_1: vec4, @location(7) model_matrix_2: vec4, @location(8) model_matrix_3: vec4, @location(9) normal_matrix_0: vec3, @location(10) normal_matrix_1: vec3, @location(11) normal_matrix_2: vec3, } struct VertexOutput { @builtin(position) clip_position: vec4, @location(0) tex_coords: vec2, @location(1) tangent_position: vec3, @location(2) tangent_light_position: vec3, @location(3) tangent_view_position: vec3, @location(4) world_position: vec4, } // Fragment shader @group(1)@binding(1) var t_light_depth: binding_array; @group(1) @binding(2) var s_light_depth: binding_array;