mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-13 22:21:17 +00:00
efc3443c61
Although it works as intended (tested via hacking), it's not hooked up as the current frame buffer handling in r_screen is not readily compatible with how vulkan output is handled. This will need some thought to get working.
237 lines
4.8 KiB
Text
237 lines
4.8 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";
|
|
}
|
|
);
|
|
};
|
|
};
|
|
|
|
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;
|
|
};
|
|
};
|
|
}
|