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.
1import bevy_render::{
2 view::View,
3 globals::Globals,
4};
5import package::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_x: vec4<f32>,
19 @location(5) border_radius_y: vec4<f32>,
20) -> UiVertexOutput {
21 var out: UiVertexOutput;
22 out.uv = vertex_uv;
23 out.position = view.clip_from_world * vec4<f32>(vertex_position, 1.0);
24 out.size = size;
25 out.border_widths = border_widths;
26 out.border_radius_x = border_radius_x;
27 out.border_radius_y = border_radius_y;
28 return out;
31@fragment
32fn fragment(in: UiVertexOutput) -> @location(0) vec4<f32> {
33 return vec4<f32>(1.0);
Contents