mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[vulkan] Correct depth and winding issues
Quake data needs clockwise winding, and both min and max depth of 0 makes for some very strange results.
This commit is contained in:
parent
a186df90f3
commit
a2a237b854
2 changed files with 15 additions and 4 deletions
|
@ -364,8 +364,12 @@ renderpass_update_viewper_sissor (qfv_renderpass_t *rp,
|
|||
auto sp = &rp->subpasses[i];
|
||||
for (uint32_t j = 0; j < sp->pipeline_count; j++) {
|
||||
auto pl = &sp->pipelines[j];
|
||||
pl->viewport.width = output->extent.width;
|
||||
pl->viewport.height = output->extent.height;
|
||||
pl->viewport = (VkViewport) {
|
||||
.width = output->extent.width,
|
||||
.height = output->extent.height,
|
||||
.minDepth = 0,
|
||||
.maxDepth = 1,
|
||||
};
|
||||
pl->scissor.extent = output->extent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -977,6 +977,7 @@ renderpasses = {
|
|||
base_pipeline = {
|
||||
@inherit = $pipeline_base;
|
||||
depthStencil = $depth_test_and_write;
|
||||
rasterization = $cw_cull_back;
|
||||
};
|
||||
pipelines = {
|
||||
bsp:depth = {
|
||||
|
@ -1070,7 +1071,10 @@ renderpasses = {
|
|||
};
|
||||
preserve = (color, emission, normal, position, output);
|
||||
};
|
||||
base_pipeline = $pipeline_base;
|
||||
base_pipeline = {
|
||||
@inherit = $pipeline_base;
|
||||
rasterization = $cw_cull_back;
|
||||
};
|
||||
pipelines = {
|
||||
bsp:skybox = {
|
||||
color = $color.bsp;
|
||||
|
@ -1167,7 +1171,10 @@ renderpasses = {
|
|||
};
|
||||
preserve = (output);
|
||||
};
|
||||
base_pipeline = $pipeline_base;
|
||||
base_pipeline = {
|
||||
@inherit = $pipeline_base;
|
||||
rasterization = $cw_cull_back;
|
||||
};
|
||||
pipelines = {
|
||||
bsp:gbuffer = {
|
||||
color = $color.bsp;
|
||||
|
|
Loading…
Reference in a new issue