[vulkan] Add bsp debug rendering to forward

Knowing where face edges are helps no end for lightmap debugging.
This commit is contained in:
Bill Currie 2024-01-25 12:52:09 +09:00
parent 559c5a51ed
commit cdca28bb10

View file

@ -107,6 +107,15 @@ properties = {
depthBiasEnable = false;
lineWidth = 1;
};
debug_poly_lines = {
depthClampEnable = false;
rasterizerDiscardEnable = false;
polygonMode = line;
cullMode = none;
frontFace = clockwise;
depthBiasEnable = false;
lineWidth = 1;
};
cw_cull_back = {
depthClampEnable = false;
rasterizerDiscardEnable = false;
@ -235,6 +244,11 @@ properties = {
name = main;
module = $builtin/bsp_gbuf.vert;
};
depth_vertex = {
stage = vertex;
name = main;
module = $builtin/bsp_depth.vert;
};
geometry = {
stage = geometry;
name = main;
@ -245,6 +259,11 @@ properties = {
name = main;
module = $builtin/quakebsp.frag;
};
debug_fragment = {
stage = fragment;
name = main;
module = $builtin/debug.frag;
};
quake_vertex = {
stage = vertex;
name = main;
@ -1284,6 +1303,43 @@ renderpasses = {
);
layout = $compose.layout;
};
debug_bsp = {
@inherit = $compose_base;
disabled = true;
color = $color.bsp;
tasks = (
{ func = bsp_visit_world;
params = (debug); },
{ func = bsp_draw_queue;
params = (debug, solid, 0); },
{ func = bsp_draw_queue;
params = (debug, sky, 0); },
{ func = bsp_draw_queue;
params = (debug, translucent, 0); },
{ func = bsp_draw_queue;
params = (debug, turbulent, 0); },
);
stages = (
$brush.shader.depth_vertex,
$brush.shader.debug_fragment,
);
vertexInput = {
bindings = (
"$brush.vertexInput.bindings[0]",
"$brush.vertexInput.bindings[1]",
);
attributes = (
"$brush.vertexInput.attributes[0]",
"$brush.vertexInput.attributes[2]",
);
};
inputAssembly = $brush.inputAssembly;
layout = $brush.layout;
rasterization = $debug_poly_lines;
depthStencil = $depth_disable;
};
};
};
};