Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1#import bevy_render::{
2 view::View,
3 globals::Globals,
4}
5#import bevy_ui::ui_vertex_output::UiVertexOutput
7@group(0) @binding(0)
8var<uniform> view: View;
9@group(0) @binding(1)
10var<uniform> globals: Globals;
12@vertex
13fn vertex(
14 @location(0) vertex_position: vec3<f32>,
15 @location(1) vertex_uv: vec2<f32>,
16 @location(2) size: vec2<f32>,
17 @location(3) border_widths: vec4<f32>,
18 @location(4) border_radius: vec4<f32>,
19) -> UiVertexOutput {
20 var out: UiVertexOutput;
21 out.uv = vertex_uv;
22 out.position = view.clip_from_world * vec4<f32>(vertex_position, 1.0);
23 out.size = size;
24 out.border_widths = border_widths;
25 out.border_radius = border_radius;
26 return out;
29@fragment
30fn fragment(in: UiVertexOutput) -> @location(0) vec4<f32> {
31 return vec4<f32>(1.0);
Contents