2020-07-16 06:42:49 +00:00
|
|
|
{
|
2021-01-10 06:52:27 +00:00
|
|
|
samplers = {
|
|
|
|
quakepic = {
|
|
|
|
magFilter = nearest;
|
|
|
|
minFilter = nearest;
|
|
|
|
mipmapMode = nearest;
|
|
|
|
addressModeU = clamp_to_edge;
|
|
|
|
addressModeV = clamp_to_edge;
|
|
|
|
addressModeW = clamp_to_edge;
|
|
|
|
mipLodBias = 0;
|
2021-01-12 04:07:51 +00:00
|
|
|
anisotropyEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
maxAnisotropy = 0;
|
2021-01-12 04:07:51 +00:00
|
|
|
compareEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
compareOp = always;
|
|
|
|
minLod = 0;
|
2021-01-12 02:27:41 +00:00
|
|
|
maxLod = 0;
|
2021-01-10 06:52:27 +00:00
|
|
|
borderColor = float_transparent_black;
|
2021-01-12 04:51:41 +00:00
|
|
|
unnormalizedCoordinates = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
quakebsp_sampler = {
|
2021-01-20 17:13:40 +00:00
|
|
|
magFilter = linear;
|
|
|
|
minFilter = linear;
|
|
|
|
mipmapMode = linear;
|
|
|
|
addressModeU = repeat;
|
|
|
|
addressModeV = repeat;
|
|
|
|
addressModeW = repeat;
|
|
|
|
mipLodBias = 0;
|
|
|
|
anisotropyEnable = false;
|
|
|
|
maxAnisotropy = 0;
|
|
|
|
compareEnable = false;
|
|
|
|
compareOp = always;
|
|
|
|
minLod = 0;
|
2021-01-21 12:24:54 +00:00
|
|
|
maxLod = 4;
|
2021-01-20 17:13:40 +00:00
|
|
|
borderColor = float_transparent_black;
|
|
|
|
unnormalizedCoordinates = false;
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
alias_sampler = {
|
2021-01-26 11:58:24 +00:00
|
|
|
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 = 1000;
|
|
|
|
borderColor = float_transparent_black;
|
|
|
|
unnormalizedCoordinates = false;
|
|
|
|
};
|
2021-01-10 06:52:27 +00:00
|
|
|
};
|
|
|
|
descriptorPools = {
|
2021-02-04 08:03:49 +00:00
|
|
|
twod_pool = {
|
2021-01-10 06:52:27 +00:00
|
|
|
flags = 0;
|
2021-02-05 01:22:32 +00:00
|
|
|
maxSets = $frames.size;
|
2021-01-10 06:52:27 +00:00
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
type = uniform_buffer;
|
2021-02-05 01:22:32 +00:00
|
|
|
descriptorCount = $frames.size;
|
2021-01-10 06:52:27 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type = combined_image_sampler;
|
2021-02-05 01:22:32 +00:00
|
|
|
descriptorCount = $frames.size;
|
2021-01-10 06:52:27 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
alias_pool = {
|
2021-01-26 11:58:24 +00:00
|
|
|
flags = 0;
|
2021-02-05 01:22:32 +00:00
|
|
|
maxSets = "2z * $frames.size";
|
2021-01-26 11:58:24 +00:00
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
type = uniform_buffer;
|
2021-02-05 01:22:32 +00:00
|
|
|
descriptorCount = "2z * $frames.size";
|
2021-01-26 11:58:24 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-24 10:58:31 +00:00
|
|
|
lighting_attach_pool = {
|
|
|
|
flags = 0;
|
|
|
|
maxSets = $frames.size;
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
type = input_attachment;
|
2021-02-25 04:46:33 +00:00
|
|
|
descriptorCount = "4z * $frames.size";
|
2021-02-24 10:58:31 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
lighting_lights_pool = {
|
|
|
|
flags = 0;
|
|
|
|
maxSets = $frames.size;
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
type = uniform_buffer;
|
|
|
|
descriptorCount = $frames.size;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
compose_attach_pool = {
|
|
|
|
flags = 0;
|
|
|
|
maxSets = $frames.size;
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
type = input_attachment;
|
|
|
|
descriptorCount = "2z * $frames.size";
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-01-05 05:15:35 +00:00
|
|
|
};
|
2021-01-04 08:36:11 +00:00
|
|
|
setLayouts = {
|
2021-02-04 08:03:49 +00:00
|
|
|
twod_set = {
|
2021-01-10 06:52:27 +00:00
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
descriptorType = uniform_buffer;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = vertex;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 1;
|
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
quakebsp_set = {
|
2021-01-21 03:39:08 +00:00
|
|
|
flags = push_descriptor;
|
2021-01-19 16:25:54 +00:00
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
descriptorType = uniform_buffer;
|
|
|
|
descriptorCount = 1;
|
2021-02-25 04:46:33 +00:00
|
|
|
stageFlags = vertex|geometry;
|
2021-01-19 16:25:54 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 1;
|
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 2;
|
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 3;
|
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
2021-01-23 11:42:53 +00:00
|
|
|
{
|
2021-01-19 16:25:54 +00:00
|
|
|
binding = 4;
|
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
2021-01-21 05:37:39 +00:00
|
|
|
{
|
2021-01-19 16:25:54 +00:00
|
|
|
binding = 5;
|
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
2021-01-23 11:42:53 +00:00
|
|
|
},
|
2021-01-19 16:25:54 +00:00
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
alias_set = {
|
2021-01-28 01:49:23 +00:00
|
|
|
flags = push_descriptor;
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
descriptorType = uniform_buffer;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = vertex;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 1;
|
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
alias_matrices = {
|
2021-01-25 15:55:45 +00:00
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
descriptorType = uniform_buffer;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = vertex;
|
|
|
|
},
|
2021-01-26 11:58:24 +00:00
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
alias_textures = {
|
2021-01-26 11:58:24 +00:00
|
|
|
flags = push_descriptor;
|
|
|
|
bindings = (
|
2021-01-25 15:55:45 +00:00
|
|
|
{
|
2021-01-26 11:58:24 +00:00
|
|
|
binding = 0;
|
2021-01-25 15:55:45 +00:00
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
2021-01-26 11:58:24 +00:00
|
|
|
binding = 1;
|
2021-01-25 15:55:45 +00:00
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
2021-01-26 11:58:24 +00:00
|
|
|
binding = 2;
|
2021-01-25 15:55:45 +00:00
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
2021-01-26 11:58:24 +00:00
|
|
|
binding = 3;
|
2021-01-25 15:55:45 +00:00
|
|
|
descriptorType = combined_image_sampler;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
alias_lights = {
|
2021-01-25 15:55:45 +00:00
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
descriptorType = uniform_buffer;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-24 10:58:31 +00:00
|
|
|
lighting_attach = {
|
2021-01-04 08:36:11 +00:00
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
2021-02-24 10:58:31 +00:00
|
|
|
descriptorType = input_attachment;
|
2021-01-04 08:36:11 +00:00
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 1;
|
2021-02-24 10:58:31 +00:00
|
|
|
descriptorType = input_attachment;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 2;
|
|
|
|
descriptorType = input_attachment;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
2021-02-25 04:46:33 +00:00
|
|
|
{
|
|
|
|
binding = 3;
|
|
|
|
descriptorType = input_attachment;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
2021-02-24 10:58:31 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
lighting_lights = {
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
2021-01-04 08:36:11 +00:00
|
|
|
descriptorType = uniform_buffer;
|
|
|
|
descriptorCount = 1;
|
2021-02-24 10:58:31 +00:00
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
compose_attach = {
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
descriptorType = input_attachment;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 1;
|
|
|
|
descriptorType = input_attachment;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
2021-01-04 08:36:11 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
pipelineLayouts = {
|
2021-02-04 08:03:49 +00:00
|
|
|
twod_layout = {
|
|
|
|
setLayouts = (twod_set);
|
2021-01-10 06:52:27 +00:00
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
quakebsp_layout = {
|
|
|
|
setLayouts = (quakebsp_set);
|
2021-01-19 16:25:54 +00:00
|
|
|
pushConstantRanges = (
|
|
|
|
{
|
|
|
|
stageFlags = vertex;
|
|
|
|
offset = 0;
|
|
|
|
size = "16 * 4";
|
|
|
|
},
|
|
|
|
{
|
|
|
|
stageFlags = fragment;
|
2021-01-20 17:13:40 +00:00
|
|
|
offset = 64;
|
2021-01-19 16:25:54 +00:00
|
|
|
size = 32;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
alias_layout = {
|
|
|
|
//setLayouts = (alias_matrices, alias_lights, alias_textures);
|
|
|
|
setLayouts = (alias_set);
|
2021-01-25 15:55:45 +00:00
|
|
|
pushConstantRanges = (
|
|
|
|
{
|
|
|
|
stageFlags = vertex;
|
|
|
|
offset = 0;
|
|
|
|
size = "16 * 4 + 4";
|
|
|
|
},
|
|
|
|
{
|
|
|
|
stageFlags = fragment;
|
2021-02-02 10:53:36 +00:00
|
|
|
offset = 68;
|
|
|
|
size = "3 * 4 + 2 * 4 * 4";
|
2021-01-25 15:55:45 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-24 10:58:31 +00:00
|
|
|
lighting_layout = {
|
|
|
|
setLayouts = (lighting_attach, lighting_lights);
|
|
|
|
};
|
|
|
|
compose_layout = {
|
|
|
|
setLayouts = (compose_attach);
|
2021-01-04 08:36:11 +00:00
|
|
|
};
|
|
|
|
};
|
2021-01-10 06:52:27 +00:00
|
|
|
pipelines = {
|
2021-02-14 02:35:06 +00:00
|
|
|
alias_depth = {
|
2021-02-17 04:50:36 +00:00
|
|
|
subpass = 0;
|
2021-02-14 02:35:06 +00:00
|
|
|
stages = (
|
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
2021-02-17 04:35:19 +00:00
|
|
|
module = $builtin/alias_depth.vert;
|
2021-02-14 02:35:06 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
vertexInput = {
|
|
|
|
bindings = (
|
|
|
|
"$properties.pipelines.alias_gbuf.vertexInput.bindings[0]",
|
|
|
|
"$properties.pipelines.alias_gbuf.vertexInput.bindings[1]",
|
|
|
|
);
|
|
|
|
attributes = (
|
|
|
|
"$properties.pipelines.alias_gbuf.vertexInput.attributes[0]",
|
|
|
|
"$properties.pipelines.alias_gbuf.vertexInput.attributes[1]",
|
|
|
|
"$properties.pipelines.alias_gbuf.vertexInput.attributes[2]",
|
|
|
|
"$properties.pipelines.alias_gbuf.vertexInput.attributes[3]",
|
|
|
|
);
|
|
|
|
};
|
|
|
|
inputAssembly = $properties.pipelines.alias_gbuf.inputAssembly;
|
|
|
|
viewport = $properties.pipelines.alias_gbuf.viewport;
|
|
|
|
rasterization = $properties.pipelines.alias_gbuf.rasterization;
|
|
|
|
multisample = $properties.pipelines.alias_gbuf.multisample;
|
|
|
|
depthStencil = {
|
|
|
|
depthTestEnable = true;
|
|
|
|
depthWriteEnable = true;
|
|
|
|
depthCompareOp = less_or_equal;
|
|
|
|
depthBoundsTestEnable = false;
|
|
|
|
stencilTestEnable = false;
|
|
|
|
};
|
|
|
|
colorBlend = $properties.pipelines.alias_gbuf.colorBlend;
|
|
|
|
dynamic = {
|
|
|
|
dynamicState = ( viewport, scissor );
|
|
|
|
};
|
|
|
|
layout = alias_layout;
|
|
|
|
//renderPass = renderpass;
|
|
|
|
};
|
|
|
|
alias_gbuf = {
|
2021-02-17 04:50:36 +00:00
|
|
|
subpass = 1;
|
2021-01-25 15:55:45 +00:00
|
|
|
stages = (
|
2021-02-04 08:03:49 +00:00
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/alias.vert;
|
|
|
|
},
|
2021-01-25 15:55:45 +00:00
|
|
|
{
|
|
|
|
stage = fragment;
|
|
|
|
name = main;
|
2021-02-17 04:35:19 +00:00
|
|
|
module = $builtin/alias_gbuf.frag;
|
2021-01-25 15:55:45 +00:00
|
|
|
specializationInfo = {
|
|
|
|
mapEntries = (
|
|
|
|
{ size = 4; offset = 0; constantID = 0; },
|
|
|
|
);
|
2021-01-26 11:58:24 +00:00
|
|
|
data = <00000008>;
|
2021-01-25 15:55:45 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
);
|
|
|
|
vertexInput = {
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
stride = "2 * 4 * 4";
|
|
|
|
inputRate = vertex;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 1;
|
|
|
|
stride = "2 * 4 * 4";
|
|
|
|
inputRate = vertex;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 2;
|
|
|
|
stride = "2 * 4";
|
|
|
|
inputRate = vertex;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
attributes = (
|
|
|
|
{
|
|
|
|
location = 0;
|
|
|
|
binding = 0;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 0;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
location = 1;
|
|
|
|
binding = 0;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 16;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
location = 2;
|
|
|
|
binding = 1;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 0;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
location = 3;
|
|
|
|
binding = 1;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 16;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
location = 4;
|
|
|
|
binding = 2;
|
|
|
|
format = r32g32_sfloat;
|
|
|
|
offset = 0;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
inputAssembly = {
|
2021-01-26 11:58:24 +00:00
|
|
|
topology = triangle_list;
|
2021-01-25 15:55:45 +00:00
|
|
|
primitiveRestartEnable = 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; };
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
rasterization = {
|
|
|
|
depthClampEnable = false;
|
|
|
|
rasterizerDiscardEnable = false;
|
|
|
|
polygonMode = fill;
|
|
|
|
cullMode = back;
|
|
|
|
frontFace = clockwise;
|
|
|
|
depthBiasEnable = false;
|
|
|
|
lineWidth = 1;
|
|
|
|
};
|
|
|
|
multisample = {
|
|
|
|
rasterizationSamples = $msaaSamples;
|
|
|
|
sampleShadingEnable = false;
|
|
|
|
minSampleShading = 0.5f;
|
|
|
|
alphaToCoverageEnable = false;
|
|
|
|
alphaToOneEnable = false;
|
|
|
|
};
|
|
|
|
depthStencil = {
|
|
|
|
depthTestEnable = true;
|
|
|
|
depthWriteEnable = true;
|
|
|
|
depthCompareOp = less_or_equal;
|
|
|
|
depthBoundsTestEnable = false;
|
|
|
|
stencilTestEnable = false;
|
|
|
|
};
|
|
|
|
colorBlend = {
|
|
|
|
logicOpEnable = false;
|
2021-02-17 04:50:36 +00:00
|
|
|
attachments = (
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
},
|
2021-02-25 04:46:33 +00:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
},
|
2021-02-17 04:50:36 +00:00
|
|
|
);
|
2021-01-25 15:55:45 +00:00
|
|
|
};
|
|
|
|
dynamic = {
|
|
|
|
dynamicState = ( viewport, scissor, blend_constants );
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
layout = alias_layout;
|
2021-01-25 15:55:45 +00:00
|
|
|
//renderPass = renderpass;
|
|
|
|
};
|
2021-02-14 02:35:06 +00:00
|
|
|
bsp_depth = {
|
2021-02-19 02:14:54 +00:00
|
|
|
subpass = 0;
|
2021-02-14 02:35:06 +00:00
|
|
|
stages = (
|
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
2021-02-17 04:35:19 +00:00
|
|
|
module = $builtin/bsp_depth.vert;
|
2021-02-14 02:35:06 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
vertexInput = {
|
|
|
|
bindings = (
|
|
|
|
"$properties.pipelines.bsp_gbuf.vertexInput.bindings[0]",
|
|
|
|
);
|
|
|
|
attributes = (
|
|
|
|
"$properties.pipelines.bsp_gbuf.vertexInput.attributes[0]",
|
|
|
|
);
|
|
|
|
};
|
2021-02-19 02:14:54 +00:00
|
|
|
inputAssembly = $properties.pipelines.bsp_gbuf.inputAssembly;
|
|
|
|
viewport = $properties.pipelines.bsp_gbuf.viewport;
|
|
|
|
rasterization = $properties.pipelines.bsp_gbuf.rasterization;
|
|
|
|
multisample = $properties.pipelines.bsp_gbuf.multisample;
|
2021-02-14 02:35:06 +00:00
|
|
|
depthStencil = {
|
|
|
|
depthTestEnable = true;
|
|
|
|
depthWriteEnable = true;
|
|
|
|
depthCompareOp = less_or_equal;
|
|
|
|
depthBoundsTestEnable = false;
|
|
|
|
stencilTestEnable = false;
|
|
|
|
};
|
|
|
|
colorBlend = $properties.pipelines.bsp_gbuf.colorBlend;
|
|
|
|
dynamic = {
|
|
|
|
dynamicState = ( viewport, scissor );
|
|
|
|
};
|
|
|
|
layout = quakebsp_layout;
|
|
|
|
//renderPass = renderpass;
|
|
|
|
};
|
|
|
|
bsp_gbuf = {
|
2021-02-19 02:14:54 +00:00
|
|
|
subpass = 1;
|
2021-01-19 16:25:54 +00:00
|
|
|
stages = (
|
2021-02-04 08:03:49 +00:00
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
2021-02-17 04:35:19 +00:00
|
|
|
module = $builtin/bsp_gbuf.vert;
|
2021-02-04 08:03:49 +00:00
|
|
|
},
|
2021-02-19 02:14:54 +00:00
|
|
|
{
|
|
|
|
stage = geometry;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/bsp_gbuf.geom;
|
|
|
|
},
|
2021-02-04 08:03:49 +00:00
|
|
|
{
|
|
|
|
stage = fragment;
|
|
|
|
name = main;
|
2021-02-17 04:35:19 +00:00
|
|
|
module = $builtin/bsp_gbuf.frag;
|
2021-02-25 06:51:54 +00:00
|
|
|
specializationInfo = {
|
|
|
|
mapEntries = (
|
|
|
|
{ size = 4; offset = 0; constantID = 0; },
|
|
|
|
{ size = 4; offset = 0; constantID = 1; },
|
|
|
|
{ size = 4; offset = 0; constantID = 2; },
|
|
|
|
{ size = 4; offset = 4; constantID = 1; },
|
|
|
|
);
|
|
|
|
data = <00000000ffffffff>;
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
},
|
2021-01-19 16:25:54 +00:00
|
|
|
);
|
|
|
|
vertexInput = {
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
2021-01-20 17:13:40 +00:00
|
|
|
stride = "2 * 4 * 4";
|
2021-01-19 16:25:54 +00:00
|
|
|
inputRate = vertex;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
attributes = (
|
|
|
|
{
|
|
|
|
location = 0;
|
2021-01-23 11:42:53 +00:00
|
|
|
binding = 0;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 0;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
location = 1;
|
|
|
|
binding = 0;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 16;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
inputAssembly = {
|
|
|
|
topology = triangle_fan;
|
|
|
|
primitiveRestartEnable = true;
|
|
|
|
};
|
|
|
|
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; };
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
rasterization = {
|
|
|
|
depthClampEnable = false;
|
|
|
|
rasterizerDiscardEnable = false;
|
|
|
|
polygonMode = fill;
|
|
|
|
cullMode = back;
|
|
|
|
frontFace = clockwise;
|
|
|
|
depthBiasEnable = false;
|
|
|
|
lineWidth = 1;
|
|
|
|
};
|
|
|
|
multisample = {
|
|
|
|
rasterizationSamples = $msaaSamples;
|
|
|
|
sampleShadingEnable = false;
|
|
|
|
minSampleShading = 0.5f;
|
|
|
|
alphaToCoverageEnable = false;
|
|
|
|
alphaToOneEnable = false;
|
|
|
|
};
|
|
|
|
depthStencil = {
|
|
|
|
depthTestEnable = true;
|
|
|
|
depthWriteEnable = true;
|
|
|
|
depthCompareOp = less_or_equal;
|
|
|
|
depthBoundsTestEnable = false;
|
|
|
|
stencilTestEnable = false;
|
|
|
|
};
|
|
|
|
colorBlend = {
|
|
|
|
logicOpEnable = false;
|
2021-02-19 02:14:54 +00:00
|
|
|
attachments = (
|
|
|
|
{
|
|
|
|
blendEnable = false;
|
|
|
|
srcColorBlendFactor = src_alpha;
|
|
|
|
dstColorBlendFactor = one_minus_src_alpha;
|
|
|
|
colorBlendOp = add;
|
|
|
|
srcAlphaBlendFactor = src_alpha;
|
|
|
|
dstAlphaBlendFactor = one_minus_src_alpha;
|
2021-02-25 04:46:33 +00:00
|
|
|
alphaBlendOp = add;
|
|
|
|
colorWriteMask = r|g|b|a;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
blendEnable = false;
|
|
|
|
srcColorBlendFactor = src_alpha;
|
|
|
|
dstColorBlendFactor = one_minus_src_alpha;
|
|
|
|
colorBlendOp = add;
|
|
|
|
srcAlphaBlendFactor = src_alpha;
|
|
|
|
dstAlphaBlendFactor = one_minus_src_alpha;
|
2021-02-19 02:14:54 +00:00
|
|
|
alphaBlendOp = add;
|
|
|
|
colorWriteMask = r|g|b|a;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
);
|
2021-01-23 11:42:53 +00:00
|
|
|
};
|
|
|
|
dynamic = {
|
|
|
|
dynamicState = ( viewport, scissor, blend_constants );
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
layout = quakebsp_layout;
|
2021-01-23 11:42:53 +00:00
|
|
|
//renderPass = renderpass;
|
|
|
|
};
|
2021-02-19 02:14:54 +00:00
|
|
|
bsp_skysheet = {
|
2021-02-23 06:43:02 +00:00
|
|
|
subpass = 2;
|
2021-01-23 11:42:53 +00:00
|
|
|
stages = (
|
2021-02-04 08:03:49 +00:00
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
2021-02-19 02:14:54 +00:00
|
|
|
module = $builtin/bsp_gbuf.vert;
|
|
|
|
},
|
2021-01-23 11:42:53 +00:00
|
|
|
{
|
|
|
|
stage = fragment;
|
|
|
|
name = main;
|
2021-02-23 06:43:02 +00:00
|
|
|
module = $builtin/bsp_sky.frag;
|
2021-01-23 11:42:53 +00:00
|
|
|
specializationInfo = {
|
|
|
|
mapEntries = (
|
|
|
|
{ size = 4; offset = 0; constantID = 0; },
|
2021-02-23 06:43:02 +00:00
|
|
|
{ size = 4; offset = 4; constantID = 1; },
|
2021-01-23 11:42:53 +00:00
|
|
|
);
|
|
|
|
data = <00000000ffffffff>;
|
|
|
|
};
|
|
|
|
},
|
|
|
|
);
|
2021-02-14 02:35:06 +00:00
|
|
|
vertexInput = $properties.pipelines.bsp_gbuf.vertexInput;
|
|
|
|
inputAssembly = $properties.pipelines.bsp_gbuf.inputAssembly;
|
|
|
|
viewport = $properties.pipelines.bsp_gbuf.viewport;
|
|
|
|
rasterization = $properties.pipelines.bsp_gbuf.rasterization;
|
|
|
|
multisample = $properties.pipelines.bsp_gbuf.multisample;
|
|
|
|
depthStencil = $properties.pipelines.bsp_gbuf.depthStencil;
|
2021-02-23 06:43:02 +00:00
|
|
|
colorBlend = {
|
|
|
|
logicOpEnable = false;
|
|
|
|
attachments = (
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-01-19 16:25:54 +00:00
|
|
|
dynamic = {
|
2021-02-14 02:35:06 +00:00
|
|
|
dynamicState = ( viewport, scissor );
|
2021-01-19 16:25:54 +00:00
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
layout = quakebsp_layout;
|
2021-01-19 16:25:54 +00:00
|
|
|
//renderPass = renderpass;
|
|
|
|
};
|
2021-01-10 06:52:27 +00:00
|
|
|
twod = {
|
2021-02-19 02:14:54 +00:00
|
|
|
subpass = 3;
|
2021-01-10 06:52:27 +00:00
|
|
|
stages = (
|
2021-02-04 08:03:49 +00:00
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/twod.vert;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
stage = fragment;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/twod.frag;
|
|
|
|
},
|
2021-01-05 14:42:30 +00:00
|
|
|
);
|
2021-01-10 06:52:27 +00:00
|
|
|
vertexInput = {
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
stride = "2 * 4 * 4";
|
|
|
|
inputRate = vertex;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
attributes = (
|
|
|
|
{
|
|
|
|
location = 0;
|
|
|
|
binding = 0;
|
2021-01-12 02:27:41 +00:00
|
|
|
format = r32g32_sfloat;
|
2021-01-10 06:52:27 +00:00
|
|
|
offset = 0;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
location = 1;
|
|
|
|
binding = 0;
|
2021-01-12 04:51:41 +00:00
|
|
|
format = r32g32_sfloat;
|
2021-01-12 02:27:41 +00:00
|
|
|
offset = 8;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
location = 2;
|
|
|
|
binding = 0;
|
2021-01-10 06:52:27 +00:00
|
|
|
format = r32g32b32a32_sfloat;
|
2021-01-12 02:27:41 +00:00
|
|
|
offset = 16;
|
2021-01-10 06:52:27 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
inputAssembly = {
|
2021-01-12 02:27:41 +00:00
|
|
|
topology = triangle_strip;
|
2021-01-12 04:07:51 +00:00
|
|
|
primitiveRestartEnable = true;
|
2021-01-10 06:52:27 +00:00
|
|
|
};
|
|
|
|
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; };
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
rasterization = {
|
2021-01-12 04:07:51 +00:00
|
|
|
depthClampEnable = false;
|
|
|
|
rasterizerDiscardEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
polygonMode = fill;
|
|
|
|
cullMode = back;
|
|
|
|
frontFace = counter_clockwise;
|
2021-01-12 04:07:51 +00:00
|
|
|
depthBiasEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
lineWidth = 1;
|
|
|
|
};
|
|
|
|
multisample = {
|
|
|
|
rasterizationSamples = $msaaSamples;
|
2021-01-12 04:07:51 +00:00
|
|
|
sampleShadingEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
minSampleShading = 0.5f;
|
2021-01-12 04:07:51 +00:00
|
|
|
alphaToCoverageEnable = false;
|
|
|
|
alphaToOneEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
};
|
|
|
|
depthStencil = {
|
2021-01-12 04:07:51 +00:00
|
|
|
depthTestEnable = true;
|
|
|
|
depthWriteEnable = true;
|
2021-01-13 15:44:34 +00:00
|
|
|
depthCompareOp = less_or_equal;
|
2021-01-12 04:07:51 +00:00
|
|
|
depthBoundsTestEnable = false;
|
|
|
|
stencilTestEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
};
|
|
|
|
colorBlend = {
|
2021-01-12 04:07:51 +00:00
|
|
|
logicOpEnable = false;
|
2021-01-10 06:52:27 +00:00
|
|
|
attachments = ({
|
2021-01-13 15:44:34 +00:00
|
|
|
blendEnable = true;
|
|
|
|
srcColorBlendFactor = src_alpha;
|
|
|
|
dstColorBlendFactor = one_minus_src_alpha;
|
2021-01-10 06:52:27 +00:00
|
|
|
colorBlendOp = add;
|
|
|
|
srcAlphaBlendFactor = src_alpha;
|
2021-01-13 15:44:34 +00:00
|
|
|
dstAlphaBlendFactor = one_minus_src_alpha;
|
2021-01-10 06:52:27 +00:00
|
|
|
alphaBlendOp = add;
|
|
|
|
colorWriteMask = r|g|b|a;
|
|
|
|
});
|
|
|
|
};
|
|
|
|
dynamic = {
|
|
|
|
dynamicState = ( viewport, scissor );
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
layout = twod_layout;
|
2021-01-10 06:52:27 +00:00
|
|
|
//renderPass = renderpass;
|
2021-01-05 14:42:30 +00:00
|
|
|
};
|
2021-02-24 10:58:31 +00:00
|
|
|
lighting = {
|
|
|
|
subpass = 2;
|
|
|
|
stages = (
|
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/passthrough.vert;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
stage = fragment;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/lighting.frag;
|
2021-03-20 07:08:44 +00:00
|
|
|
specializationInfo = {
|
|
|
|
mapEntries = (
|
|
|
|
{ size = 4; offset = 0; constantID = 0; },
|
|
|
|
);
|
|
|
|
data = <00000100>;
|
|
|
|
};
|
2021-02-24 10:58:31 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
vertexInput = {
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
stride = "4 * 4";
|
|
|
|
inputRate = vertex;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
attributes = (
|
|
|
|
{
|
|
|
|
location = 0;
|
|
|
|
binding = 0;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 0;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
inputAssembly = {
|
|
|
|
topology = triangle_strip;
|
|
|
|
primitiveRestartEnable = 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; };
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
rasterization = {
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
depthStencil = {
|
|
|
|
depthTestEnable = false;
|
|
|
|
depthWriteEnable = false;
|
|
|
|
depthCompareOp = less_or_equal;
|
|
|
|
depthBoundsTestEnable = false;
|
|
|
|
stencilTestEnable = false;
|
|
|
|
};
|
|
|
|
colorBlend = {
|
|
|
|
logicOpEnable = false;
|
|
|
|
attachments = (
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
dynamic = {
|
|
|
|
dynamicState = ( viewport, scissor );
|
|
|
|
};
|
|
|
|
layout = lighting_layout;
|
|
|
|
//renderPass = renderpass;
|
|
|
|
};
|
|
|
|
compose = {
|
|
|
|
subpass = 4;
|
|
|
|
stages = (
|
|
|
|
{
|
|
|
|
stage = vertex;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/passthrough.vert;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
stage = fragment;
|
|
|
|
name = main;
|
|
|
|
module = $builtin/compose.frag;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
vertexInput = {
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
stride = "4 * 4";
|
|
|
|
inputRate = vertex;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
attributes = (
|
|
|
|
{
|
|
|
|
location = 0;
|
|
|
|
binding = 0;
|
|
|
|
format = r32g32b32a32_sfloat;
|
|
|
|
offset = 0;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
inputAssembly = {
|
|
|
|
topology = triangle_strip;
|
|
|
|
primitiveRestartEnable = 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; };
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
rasterization = {
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
depthStencil = {
|
|
|
|
depthTestEnable = false;
|
|
|
|
depthWriteEnable = false;
|
|
|
|
depthCompareOp = less_or_equal;
|
|
|
|
depthBoundsTestEnable = false;
|
|
|
|
stencilTestEnable = false;
|
|
|
|
};
|
|
|
|
colorBlend = {
|
|
|
|
logicOpEnable = false;
|
|
|
|
attachments = (
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
dynamic = {
|
|
|
|
dynamicState = ( viewport, scissor );
|
|
|
|
};
|
|
|
|
layout = compose_layout;
|
|
|
|
//renderPass = renderpass;
|
|
|
|
};
|
2021-01-05 08:43:26 +00:00
|
|
|
};
|
2020-07-16 06:42:49 +00:00
|
|
|
renderpass = {
|
|
|
|
attachments = (
|
|
|
|
{
|
|
|
|
flags = 0;
|
|
|
|
format = $swapchain.format;
|
2021-02-02 15:08:33 +00:00
|
|
|
samples = 1;
|
2020-07-16 06:42:49 +00:00
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
2021-02-02 15:08:33 +00:00
|
|
|
finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
|
2020-07-16 06:42:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
flags = 0;
|
2020-12-21 09:38:31 +00:00
|
|
|
format = VK_FORMAT_D32_SFLOAT;
|
2021-02-02 15:08:33 +00:00
|
|
|
samples = 1;
|
2020-07-16 06:42:49 +00:00
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
2020-12-21 09:38:31 +00:00
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
2020-07-16 06:42:49 +00:00
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
2020-12-21 09:38:31 +00:00
|
|
|
finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
2020-07-16 06:42:49 +00:00
|
|
|
},
|
2021-02-02 15:08:33 +00:00
|
|
|
);
|
|
|
|
subpasses = (
|
|
|
|
{
|
|
|
|
pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
|
|
|
|
colorAttachments = (
|
|
|
|
{
|
|
|
|
attachment = 0;
|
|
|
|
layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
depthStencilAttachment = {
|
|
|
|
attachment = 1;
|
|
|
|
layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
|
|
|
};
|
|
|
|
preserveAttachments = ();
|
|
|
|
},
|
|
|
|
);
|
|
|
|
dependencies = (
|
|
|
|
{
|
|
|
|
srcSubpass = VK_SUBPASS_EXTERNAL;
|
|
|
|
dstSubpass = 0;
|
|
|
|
srcStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
|
|
|
dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
|
|
|
srcAccessMask = VK_ACCESS_MEMORY_READ_BIT;
|
|
|
|
dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
|
|
|
dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
srcSubpass = 0;
|
|
|
|
dstSubpass = VK_SUBPASS_EXTERNAL;
|
|
|
|
srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
|
|
|
dstStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
|
|
|
srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
|
|
|
dstAccessMask = VK_ACCESS_MEMORY_READ_BIT;
|
|
|
|
dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
2021-02-04 08:03:49 +00:00
|
|
|
renderpass_msaa = {
|
2021-02-02 15:08:33 +00:00
|
|
|
attachments = (
|
2020-07-16 06:42:49 +00:00
|
|
|
{
|
|
|
|
flags = 0;
|
2020-12-21 09:38:31 +00:00
|
|
|
format = $swapchain.format;
|
2020-07-16 06:42:49 +00:00
|
|
|
samples = VK_SAMPLE_COUNT_1_BIT;
|
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
|
|
finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
|
|
|
|
},
|
2021-02-02 15:08:33 +00:00
|
|
|
{
|
|
|
|
flags = 0;
|
|
|
|
format = VK_FORMAT_D32_SFLOAT;
|
|
|
|
samples = $msaaSamples;
|
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
|
|
finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
flags = 0;
|
|
|
|
format = $swapchain.format;
|
|
|
|
samples = $msaaSamples;
|
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
|
|
finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
|
|
|
},
|
2020-07-16 06:42:49 +00:00
|
|
|
);
|
|
|
|
subpasses = (
|
|
|
|
{
|
2020-12-21 09:38:31 +00:00
|
|
|
pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
|
2020-07-16 15:33:00 +00:00
|
|
|
colorAttachments = (
|
2020-07-16 06:42:49 +00:00
|
|
|
{
|
2021-02-02 15:08:33 +00:00
|
|
|
attachment = 2;
|
2020-07-16 06:42:49 +00:00
|
|
|
layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
resolveAttachments = (
|
|
|
|
{
|
2021-02-02 15:08:33 +00:00
|
|
|
attachment = 0;
|
2020-07-16 06:42:49 +00:00
|
|
|
layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
depthStencilAttachment = {
|
2020-07-16 15:33:00 +00:00
|
|
|
attachment = 1;
|
2020-12-21 09:38:31 +00:00
|
|
|
layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
2020-07-16 06:42:49 +00:00
|
|
|
};
|
|
|
|
preserveAttachments = ();
|
|
|
|
},
|
|
|
|
);
|
|
|
|
dependencies = (
|
|
|
|
{
|
|
|
|
srcSubpass = VK_SUBPASS_EXTERNAL;
|
|
|
|
dstSubpass = 0;
|
2021-01-16 11:27:48 +00:00
|
|
|
srcStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
2020-07-16 06:42:49 +00:00
|
|
|
dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
2021-01-16 11:27:48 +00:00
|
|
|
srcAccessMask = VK_ACCESS_MEMORY_READ_BIT;
|
|
|
|
dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
|
|
|
dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
srcSubpass = 0;
|
|
|
|
dstSubpass = VK_SUBPASS_EXTERNAL;
|
|
|
|
srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
|
|
|
dstStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
|
|
|
|
srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
|
|
|
dstAccessMask = VK_ACCESS_MEMORY_READ_BIT;
|
|
|
|
dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
|
|
|
|
},
|
2020-07-16 06:42:49 +00:00
|
|
|
);
|
2021-01-05 08:43:26 +00:00
|
|
|
};
|
2020-07-16 06:42:49 +00:00
|
|
|
}
|