[vulkan] Port line rendering to the new system
I'd already done the programming side when doing slice rendering, but hadn't hooked up line rendering in the render spec.
This commit is contained in:
parent
12f1b31701
commit
3c9bd77346
|
@ -12,6 +12,7 @@ properties = {
|
||||||
waterwarp = "[0.0, 0.7, 0.7, 1]";
|
waterwarp = "[0.0, 0.7, 0.7, 1]";
|
||||||
fisheye = "[0.0, 0.7, 0.7, 1]";
|
fisheye = "[0.0, 0.7, 0.7, 1]";
|
||||||
slice = "[0.8, 0.7, 0.2, 1]";
|
slice = "[0.8, 0.7, 0.2, 1]";
|
||||||
|
lines = "[0.8, 0.7, 0.4, 1]";
|
||||||
};
|
};
|
||||||
color_dependency = {
|
color_dependency = {
|
||||||
src = {
|
src = {
|
||||||
|
@ -586,6 +587,36 @@ properties = {
|
||||||
descriptorSets = (matrix_set, quad_data_set);
|
descriptorSets = (matrix_set, quad_data_set);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
lines = {
|
||||||
|
shader = {
|
||||||
|
vertex = {
|
||||||
|
stage = vertex;
|
||||||
|
name = main;
|
||||||
|
module = $builtin/line.vert;
|
||||||
|
};
|
||||||
|
fragment = {
|
||||||
|
stage = fragment;
|
||||||
|
name = main;
|
||||||
|
module = $builtin/line.frag;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
vertexInput = {
|
||||||
|
bindings = (
|
||||||
|
{ binding = 0; stride = "2 * 4 + 4"; inputRate = vertex; },
|
||||||
|
);
|
||||||
|
attributes = (
|
||||||
|
{ location = 0; binding = 0; format = r32g32_sfloat; offset = 0; },
|
||||||
|
{ location = 1; binding = 0; format = r8g8b8a8_unorm; offset = 4; },
|
||||||
|
);
|
||||||
|
};
|
||||||
|
inputAssembly = {
|
||||||
|
topology = line_list;
|
||||||
|
primitiveRestartEnable = false;
|
||||||
|
};
|
||||||
|
layout = {
|
||||||
|
descriptorSets = (matrix_set);
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
descriptorSetLayouts = {
|
descriptorSetLayouts = {
|
||||||
matrix_set = {
|
matrix_set = {
|
||||||
|
@ -1324,6 +1355,22 @@ renderpasses = {
|
||||||
inputAssembly = $slice.inputAssembly;
|
inputAssembly = $slice.inputAssembly;
|
||||||
layout = $slice.layout;
|
layout = $slice.layout;
|
||||||
};
|
};
|
||||||
|
lines = {
|
||||||
|
@inherit = $compose_base;
|
||||||
|
|
||||||
|
color = $color.lines;
|
||||||
|
tasks = (
|
||||||
|
{ func = line_draw; },
|
||||||
|
);
|
||||||
|
|
||||||
|
stages = (
|
||||||
|
$lines.shader.vertex,
|
||||||
|
$lines.shader.fragment,
|
||||||
|
);
|
||||||
|
vertexInput = $lines.vertexInput;
|
||||||
|
inputAssembly = $lines.inputAssembly;
|
||||||
|
layout = $lines.layout;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue