Refactor to generalize pipeline drawing sequence

This commit is contained in:
Keavon Chambers
2020-05-23 12:36:47 -07:00
parent 9a60ba54fe
commit a9859b4bb4
18 changed files with 628 additions and 337 deletions
+19 -3
View File
@@ -4,8 +4,24 @@ layout(location=0) in vec2 v_uv;
layout(location=0) out vec4 f_color;
layout(set = 0, binding = 0) uniform sampler2D t_texture;
struct Dimensions_u32 { uint width; uint height; };
struct Corners_f32 { float top_left; float top_right; float bottom_right; float bottom_left; };
struct Sides_f32 { float top; float right; float bottom; float left; };
layout(set=0, binding=0) uniform GuiNodeUniform {
Dimensions_u32 dimensions;
Corners_f32 corners_radius;
Sides_f32 sides_inset;
float border_thickness;
vec4 border_color;
vec4 fill_color;
};
layout(set=0, binding=1) uniform sampler2D t_texture;
// layout(set=1, binding=0) uniform WindowUniform {
// Dimensions_u32 window_dimensions;
// };
void main() {
f_color = texture(t_texture, v_uv / textureSize(t_texture, 0) * 100);
}
f_color = fill_color * texture(t_texture, v_uv / textureSize(t_texture, 0) * 100);
}