SHADOW_PASS_WGSL

Constant SHADOW_PASS_WGSL 

Source
pub const SHADOW_PASS_WGSL: &str = "// Copyright 2025 eraflo\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Minimal depth-only shader for shadow map generation.\n\nstruct CameraUniforms {\n    view_projection: mat4x4<f32>,\n    camera_position: vec4<f32>,\n};\n\nstruct ModelUniforms {\n    model_matrix: mat4x4<f32>,\n    normal_matrix: mat4x4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> camera: CameraUniforms;\n@group(1) @binding(0) var<uniform> model: ModelUniforms;\n\nstruct VertexInput {\n    @location(0) position: vec3<f32>,\n};\n\nstruct VertexOutput {\n    @builtin(position) clip_position: vec4<f32>,\n};\n\n@vertex\nfn vs_main(input: VertexInput) -> VertexOutput {\n    var out: VertexOutput;\n    out.clip_position = camera.view_projection * model.model_matrix * vec4<f32>(input.position, 1.0);\n    return out;\n}\n\n// No fragment shader needed for depth-only pass\n";
Expand description

Minimal depth-only shader for shadow map generation.