mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-02 09:31:12 +00:00
[vulkan] Get fisheye working except for translucency
The OIT heads buffer is only a single-layer image, which breaks cube map rendering, but once this is sorted, it looks like fisheye will work well.
This commit is contained in:
parent
7ba347cb6c
commit
8f1de6865f
5 changed files with 10 additions and 11 deletions
|
@ -54,6 +54,5 @@ struct vulkan_ctx_s;
|
||||||
void Vulkan_Output_Init (struct vulkan_ctx_s *ctx);
|
void Vulkan_Output_Init (struct vulkan_ctx_s *ctx);
|
||||||
void Vulkan_Output_Setup (struct vulkan_ctx_s *ctx);
|
void Vulkan_Output_Setup (struct vulkan_ctx_s *ctx);
|
||||||
void Vulkan_Output_Shutdown (struct vulkan_ctx_s *ctx);
|
void Vulkan_Output_Shutdown (struct vulkan_ctx_s *ctx);
|
||||||
void Vulkan_Output_SetInput (struct vulkan_ctx_s *ctx, VkImageView input);
|
|
||||||
|
|
||||||
#endif//__QF_Vulkan_qf_output_h
|
#endif//__QF_Vulkan_qf_output_h
|
||||||
|
|
|
@ -720,6 +720,7 @@ init_rpCreate (uint32_t index, const qfv_renderinfo_t *rinfo, objstate_t *s)
|
||||||
|
|
||||||
*s->rpc = (VkRenderPassCreateInfo) {
|
*s->rpc = (VkRenderPassCreateInfo) {
|
||||||
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
|
||||||
|
.pNext = s->rpi->pNext,
|
||||||
.attachmentCount = s->rpi->framebuffer.num_attachments,
|
.attachmentCount = s->rpi->framebuffer.num_attachments,
|
||||||
.pAttachments = attachments,
|
.pAttachments = attachments,
|
||||||
.subpassCount = s->rpi->num_subpasses,
|
.subpassCount = s->rpi->num_subpasses,
|
||||||
|
|
|
@ -1423,11 +1423,10 @@ renderpasses = {
|
||||||
@inherit = $renderpasses.deferred;
|
@inherit = $renderpasses.deferred;
|
||||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||||
viewMasks = (0x3fu, 0x3fu, 0x3fu, 0x3fu, 0x3fu);
|
viewMasks = (0x3fu, 0x3fu, 0x3fu, 0x3fu, 0x3fu);
|
||||||
viewOffsets = ( 0, 0, 0, 0, 0);
|
|
||||||
});
|
});
|
||||||
framebuffer = {
|
framebuffer = {
|
||||||
width = $render_output.extent.width;
|
width = "min($render_output.extent.width,$render_output.extent.height)";
|
||||||
height = $render_output.extent.height;
|
height = "min($render_output.extent.width,$render_output.extent.height)";
|
||||||
layers = 1;
|
layers = 1;
|
||||||
attachments = {
|
attachments = {
|
||||||
depth = {
|
depth = {
|
||||||
|
@ -1475,6 +1474,7 @@ renderpasses = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
output = cube_output;
|
||||||
};
|
};
|
||||||
output = {
|
output = {
|
||||||
color = "[0, 1, 1, 1]";
|
color = "[0, 1, 1, 1]";
|
||||||
|
|
|
@ -363,10 +363,3 @@ Vulkan_Output_Shutdown (vulkan_ctx_t *ctx)
|
||||||
free (octx->frames.a);
|
free (octx->frames.a);
|
||||||
free (octx);
|
free (octx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Vulkan_Output_SetInput (vulkan_ctx_t *ctx, VkImageView input)
|
|
||||||
{
|
|
||||||
outputctx_t *octx = ctx->output_context;
|
|
||||||
octx->input = input;
|
|
||||||
}
|
|
||||||
|
|
|
@ -209,4 +209,10 @@ Vulkan_ConfigOutput (vulkan_ctx_t *ctx, qfv_output_t *output)
|
||||||
if (vulkan_frame_height > 0) {
|
if (vulkan_frame_height > 0) {
|
||||||
output->extent.height = vulkan_frame_height;
|
output->extent.height = vulkan_frame_height;
|
||||||
}
|
}
|
||||||
|
if (scr_fisheye) {//FIXME
|
||||||
|
auto w = output->extent.width;
|
||||||
|
auto h = output->extent.height;
|
||||||
|
output->extent.width = min (w, h);
|
||||||
|
output->extent.height = min (w, h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue