Enable depthWriteEnable for particles

This commit is contained in:
Denis Pauk 2021-01-10 13:25:10 +02:00
parent 1bc60032e7
commit 3b9aa6448e
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
// 8.13.3559
// 8.13.3743
#pragma once
const uint32_t particle_vert_spv[] = {
0x07230203,0x00010000,0x00080008,0x0000002d,0x00000000,0x00020011,0x00000001,0x0006000b,
@ -34,7 +34,7 @@ const uint32_t particle_vert_spv[] = {
0x00000001,0x0004003b,0x0000001e,0x00000026,0x00000003,0x00040020,0x00000027,0x00000001,
0x00000007,0x0004003b,0x00000027,0x00000028,0x00000001,0x00040020,0x0000002a,0x00000003,
0x00000006,0x0004003b,0x0000002a,0x0000002b,0x00000003,0x0004002b,0x00000006,0x0000002c,
0x00000000,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,
0x3f000000,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,
0x00050041,0x00000011,0x00000012,0x00000010,0x0000000c,0x0004003d,0x0000000d,0x00000013,
0x00000012,0x0004003d,0x00000014,0x00000017,0x00000016,0x00050051,0x00000006,0x00000019,
0x00000017,0x00000000,0x00050051,0x00000006,0x0000001a,0x00000017,0x00000001,0x00050051,

View File

@ -1238,7 +1238,7 @@ static void CreatePipelines()
// draw particles pipeline (using a texture)
VK_LOAD_VERTFRAG_SHADERS(shaders, particle, basic);
vk_drawParticlesPipeline.depthWriteEnable = VK_FALSE;
vk_drawParticlesPipeline.depthWriteEnable = VK_TRUE;
vk_drawParticlesPipeline.blendOpts.blendEnable = VK_TRUE;
QVk_CreatePipeline(&vk_samplerDescSetLayout, 1, &vertInfoRGB_RGBA_RG, &vk_drawParticlesPipeline, &vk_renderpasses[RP_WORLD], shaders, 2);
QVk_DebugSetObjectName((uint64_t)vk_drawParticlesPipeline.layout, VK_OBJECT_TYPE_PIPELINE_LAYOUT, "Pipeline Layout: textured particles");
@ -1247,7 +1247,7 @@ static void CreatePipelines()
// draw particles pipeline (using point list)
VK_LOAD_VERTFRAG_SHADERS(shaders, point_particle, point_particle);
vk_drawPointParticlesPipeline.topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
vk_drawPointParticlesPipeline.depthWriteEnable = VK_FALSE;
vk_drawPointParticlesPipeline.depthWriteEnable = VK_TRUE;
vk_drawPointParticlesPipeline.blendOpts.blendEnable = VK_TRUE;
QVk_CreatePipeline(&vk_uboDescSetLayout, 1, &vertInfoRGB_RGBA, &vk_drawPointParticlesPipeline, &vk_renderpasses[RP_WORLD], shaders, 2);
QVk_DebugSetObjectName((uint64_t)vk_drawPointParticlesPipeline.layout, VK_OBJECT_TYPE_PIPELINE_LAYOUT, "Pipeline Layout: point particles");

View File

@ -22,5 +22,5 @@ void main() {
gl_Position = pc.mvpMatrix * vec4(inVertex, 1.0);
texCoord = inTexCoord;
color = inColor;
aTreshold = 0.0;
aTreshold = 0.5;
}