ui.wgsl
Name | Group | Binding index | Binding type | Type |
---|---|---|---|---|
view
#
![]() |
0 | 0 | <uniform> | View |
sprite_texture
#
![]() |
1 | 0 | texture_2d<f32> | |
sprite_sampler
#
![]() |
1 | 1 |
sampler
![]() |
Annotation | Name | Type |
---|---|---|
location(0) | uv |
vec2<f32>
![]() |
location(1) | color |
vec4<f32>
![]() |
location(6) | point |
vec2<f32>
![]() |
builtin(position) | position |
vec4<f32>
![]() |
Parameter | Type |
---|---|
vertex_position |
vec3<f32>
![]() |
vertex_uv |
vec2<f32>
![]() |
vertex_color |
vec4<f32>
![]() |
flags |
u32
![]() |
y | top right |
z | bottom right |
w | bottom left. @location(4) radius: vec4<f32> |
y | top |
z | right |
w | bottom. @location(5) border: vec4<f32> |
size |
vec2<f32>
![]() |
point |
vec2<f32>
![]() |
Parameter | Type |
---|---|
point |
vec2<f32>
![]() |
size |
vec2<f32>
![]() |
corner_radii |
vec4<f32>
![]() |
Parameter | Type |
---|---|
point |
vec2<f32>
![]() |
size |
vec2<f32>
![]() |
radius |
vec4<f32>
![]() |
inset |
vec4<f32>
![]() |
Parameter | Type |
---|---|
distance |
f32
![]() |
Parameter | Type |
---|---|
in | VertexOutput |
texture_color |
vec4<f32>
![]() |
Parameter | Type |
---|---|
in | VertexOutput |
texture_color |
vec4<f32>
![]() |
Parameter | Type |
---|---|
in | VertexOutput |
point
-> The function will return the distance from this point to the closest point on the boundary. -size
-> The maximum width and height of the box. -corner_radii
-> The radius of each rounded corner. Ordered counter clockwise starting top left: x: top left, y: top right, z: bottom right, w: bottom left.