quakeforge/libs/video/renderer/vulkan/rp_output.plist
Bill Currie d673887bf1 [vulkan] Get two render pass rendering working
Things are a bit of a mess with interdependence between sub-module
initialization and render pass initialization, and window resizing is
broken, but the main render pass rendering to an image that is then
post-processed (currently just blitted) is working. This will make it
possible to implement fisheye and water warp (and other effects, of
course).
2022-11-25 11:07:08 +09:00

90 lines
1.7 KiB
Text

{
flat_color_image_template = {
imageType = `2d;
samples = 1;
extent = {
width = $output.extent.width;
height = $output.extent.height;
depth = 1;
};
mipLevels = 1;
arrayLayers = 1;
tiling = optimal;
usage = color_attachment|sampled;
initialLayout = undefined;
};
images = {
ocolor = {
@inherit = $properties.flat_color_image_template;
format = r16g16b16a16_sfloat;
};
};
flat_color_view_template = {
viewType = VK_IMAGE_VIEW_TYPE_2D;
components = {
r = identity;
g = identity;
b = identity;
a = identity;
};
subresourceRange = {
aspectMask = color;
levelCount = 1;
layerCount = 1;
};
};
imageViews = {
ocolor = {
@inherit = $properties.flat_color_view_template;
image = ocolor;
format = $properties.images.ocolor.format;
};
};
framebuffer = {
renderPass = output;
attachments = ($output.view);
width = $output.extent.width;
height = $output.extent.height;
layers = 1;
};
clearValues = (
{ color = "[0, 0, 0, 1]"; }, // output
);
attachment_template = {
samples = 1;
loadOp = dont_care;
storeOp = dont_care;
stencilLoadOp = dont_care;
stencilStoreOp = dont_care;
initialLayout = undefined;
finalLayout = color_attachment_optimal;
};
info = {
color = "[0.9, 0.9, 0.9, 1]";
subpass_info = (
{ name = compose; color = "[ 0.9, 0.9, 0.9, 1]" },
);
};
renderpass = {
attachments = (
{
@inherit = $properties.attachment_template;
format = $output.format;
loadOp = clear;
storeOp = store;
finalLayout = present_src_khr;
},
);
subpasses = (
{ // 0 output
pipelineBindPoint = graphics;
colorAttachments = (
{ // output
attachment = 0;
layout = color_attachment_optimal;
},
);
},
);
};
}