mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
4cb120e878
There are some missing parts from this commit as these are the fairly clean changes. Missing is building a separate set of pipelines for the new render pass (might be able to get away from that), OIT heads texture is flat rather than an array, view matrices aren't set up, and the fisheye renderer isn't hooked up to the output pass (code exists but is messy). However, with the missing parts included, testing shows things mostly working: the cube map is rendered correctly even though it's not displayed correctly (incorrect view). This has definitely proven to be a good test for Vulkan's multiview feature (very nice).
260 lines
5.2 KiB
Text
260 lines
5.2 KiB
Text
{
|
|
samplers = {
|
|
linear = {
|
|
magFilter = linear;
|
|
minFilter = linear;
|
|
mipmapMode = linear;
|
|
addressModeU = clamp_to_edge;
|
|
addressModeV = clamp_to_edge;
|
|
addressModeW = clamp_to_edge;
|
|
mipLodBias = 0;
|
|
anisotropyEnable = false;
|
|
maxAnisotropy = 0;
|
|
compareEnable = false;
|
|
compareOp = always;
|
|
minLod = 0;
|
|
maxLod = 0;
|
|
borderColor = float_transparent_black;
|
|
unnormalizedCoordinates = false;
|
|
};
|
|
};
|
|
descriptorPools = {
|
|
output_pool = {
|
|
flags = 0;
|
|
maxSets = "$frames.size * 2z";
|
|
bindings = (
|
|
{
|
|
type = combined_image_sampler;
|
|
descriptorCount = "$frames.size * 2z";
|
|
},
|
|
);
|
|
};
|
|
};
|
|
setLayouts = {
|
|
matrix_set = {
|
|
bindings = (
|
|
{
|
|
binding = 0;
|
|
descriptorType = uniform_buffer;
|
|
descriptorCount = 1;
|
|
stageFlags = vertex|geometry|fragment;
|
|
},
|
|
);
|
|
};
|
|
output_set = {
|
|
bindings = (
|
|
{
|
|
binding = 0;
|
|
descriptorType = combined_image_sampler;
|
|
descriptorCount = 1;
|
|
stageFlags = fragment;
|
|
},
|
|
);
|
|
};
|
|
};
|
|
pipelineLayouts = {
|
|
output_layout = {
|
|
setLayouts = (matrix_set, output_set);
|
|
};
|
|
waterwarp_layout = {
|
|
@inherit = $properties.pipelineLayouts.output_layout;
|
|
pushConstantRanges = (
|
|
{
|
|
stageFlags = fragment;
|
|
offset = 0;
|
|
size = "4";
|
|
}
|
|
);
|
|
};
|
|
fisheye_layout = {
|
|
@inherit = $properties.pipelineLayouts.output_layout;
|
|
pushConstantRanges = (
|
|
{
|
|
stageFlags = fragment;
|
|
offset = 0;
|
|
size = "2 * 4";
|
|
}
|
|
);
|
|
};
|
|
};
|
|
|
|
depthStencil = {
|
|
disable = {
|
|
depthTestEnable = false;
|
|
depthWriteEnable = false;
|
|
depthCompareOp = less_or_equal;
|
|
depthBoundsTestEnable = false;
|
|
stencilTestEnable = false;
|
|
};
|
|
};
|
|
|
|
inputAssembly = {
|
|
};
|
|
|
|
vertexInput = {
|
|
index_only = {
|
|
bindings = ();
|
|
attributes = ();
|
|
};
|
|
};
|
|
|
|
rasterization = {
|
|
cw_cull_back = {
|
|
depthClampEnable = false;
|
|
rasterizerDiscardEnable = false;
|
|
polygonMode = fill;
|
|
cullMode = back;
|
|
frontFace = clockwise;
|
|
depthBiasEnable = false;
|
|
lineWidth = 1;
|
|
};
|
|
counter_cw_cull_back = {
|
|
depthClampEnable = false;
|
|
rasterizerDiscardEnable = false;
|
|
polygonMode = fill;
|
|
cullMode = back;
|
|
frontFace = counter_clockwise;
|
|
depthBiasEnable = false;
|
|
lineWidth = 1;
|
|
};
|
|
};
|
|
|
|
multisample = {
|
|
rasterizationSamples = $msaaSamples;
|
|
sampleShadingEnable = false;
|
|
minSampleShading = 0.5f;
|
|
alphaToCoverageEnable = false;
|
|
alphaToOneEnable = false;
|
|
};
|
|
|
|
viewport = {
|
|
viewports = (
|
|
{
|
|
x = 0; y = 0;
|
|
width = 640; height = 480;
|
|
minDepth = 0; maxDepth = 1;
|
|
}
|
|
);
|
|
scissors = (
|
|
{
|
|
offset = { x = 0; y = 0 };
|
|
extent = { width = 640; height = 480; };
|
|
},
|
|
);
|
|
};
|
|
|
|
attachmentBlendOp = {
|
|
disabled = {
|
|
blendEnable = false;
|
|
srcColorBlendFactor = src_alpha;
|
|
dstColorBlendFactor = one_minus_src_alpha;
|
|
colorBlendOp = add;
|
|
srcAlphaBlendFactor = src_alpha;
|
|
dstAlphaBlendFactor = one_minus_src_alpha;
|
|
alphaBlendOp = add;
|
|
colorWriteMask = r|g|b|a;
|
|
};
|
|
alpha_blend = {
|
|
blendEnable = true;
|
|
srcColorBlendFactor = one;
|
|
dstColorBlendFactor = one_minus_src_alpha;
|
|
colorBlendOp = add;
|
|
srcAlphaBlendFactor = one;
|
|
dstAlphaBlendFactor = one_minus_src_alpha;
|
|
alphaBlendOp = add;
|
|
colorWriteMask = r|g|b|a;
|
|
};
|
|
};
|
|
|
|
fstriangle = {
|
|
vertexStage = {
|
|
stage = vertex;
|
|
name = main;
|
|
module = $builtin/fstriangle.vert;
|
|
};
|
|
vertexStageST = {
|
|
stage = vertex;
|
|
name = main;
|
|
module = $builtin/fstrianglest.vert;
|
|
};
|
|
vertexInput = {
|
|
bindings = ();
|
|
attributes = ();
|
|
};
|
|
inputAssembly = {
|
|
topology = triangle_list;
|
|
primitiveRestartEnable = false;
|
|
};
|
|
colorBlend = {
|
|
logicOpEnable = false;
|
|
attachments = ($properties.attachmentBlendOp.disabled);
|
|
};
|
|
};
|
|
|
|
pipelines = {
|
|
base = {
|
|
viewport = $properties.viewport;
|
|
rasterization = $properties.rasterization.counter_cw_cull_back;
|
|
multisample = $properties.multisample;
|
|
depthStencil = $properties.depthStencil.disable;
|
|
colorBlend = {
|
|
logicOpEnable = false;
|
|
attachments = (
|
|
$properties.attachmentBlendOp.disabled,
|
|
$properties.attachmentBlendOp.disabled,
|
|
$properties.attachmentBlendOp.disabled,
|
|
$properties.attachmentBlendOp.disabled,
|
|
);
|
|
};
|
|
dynamic = {
|
|
dynamicState = ( viewport, scissor );
|
|
};
|
|
renderPass = output;
|
|
};
|
|
output_base = {
|
|
@inherit = $properties.pipelines.base;
|
|
vertexInput = $properties.fstriangle.vertexInput;
|
|
inputAssembly = $properties.fstriangle.inputAssembly;
|
|
colorBlend = $properties.fstriangle.colorBlend;
|
|
};
|
|
output = {
|
|
@inherit = $properties.pipelines.output_base;
|
|
subpass = 0;
|
|
stages = (
|
|
$properties.fstriangle.vertexStage,
|
|
{
|
|
stage = fragment;
|
|
name = main;
|
|
module = $builtin/output.frag;
|
|
},
|
|
);
|
|
layout = output_layout;
|
|
};
|
|
waterwarp = {
|
|
@inherit = $properties.pipelines.output_base;
|
|
subpass = 0;
|
|
stages = (
|
|
$properties.fstriangle.vertexStageST,
|
|
{
|
|
stage = fragment;
|
|
name = main;
|
|
module = $builtin/waterwarp.frag;
|
|
},
|
|
);
|
|
layout = waterwarp_layout;
|
|
};
|
|
fisheye = {
|
|
@inherit = $properties.pipelines.output_base;
|
|
subpass = 0;
|
|
stages = (
|
|
$properties.fstriangle.vertexStageST,
|
|
{
|
|
stage = fragment;
|
|
name = main;
|
|
module = $builtin/fisheye.frag;
|
|
},
|
|
);
|
|
layout = fisheye_layout;
|
|
};
|
|
};
|
|
}
|