1#import bevy_core_pipeline::fullscreen_vertex_shader::FullscreenVertexOutput 2#import bevy_mod_outline::common::OutlineViewUniform 4struct ComposeOutputUniform { 6 volume_colour: vec4<f32>, 9@group(0) @binding(0) var screen_texture: texture_2d<f32>; 10@group(0) @binding(1) var texture_sampler: sampler; 11@group(0) @binding(2) var<uniform> view: OutlineViewUniform; 12@group(0) @binding(3) var<uniform> instance: ComposeOutputUniform; 14struct FragmentOutput { 15 @location(0) colour: vec4<f32>, 16 @builtin(frag_depth) frag_depth: f32, 20fn fragment(in: FullscreenVertexOutput) -> FragmentOutput { 21 let tex = textureSample(screen_texture, texture_sampler, in.uv); 22 var out: FragmentOutput; 23 if distance(in.position.xy, tex.xy) <= view.scale_physical_from_logical * instance.volume_offset { 24 out.colour = instance.volume_colour; 25 out.frag_depth = tex.z;