From 3b9aa6448ea5fde2b6aed667272f3010ec7029b3 Mon Sep 17 00:00:00 2001 From: Denis Pauk Date: Sun, 10 Jan 2021 13:25:10 +0200 Subject: [PATCH] Enable depthWriteEnable for particles --- src/client/refresh/vk/spirv/particle_vert.c | 4 ++-- src/client/refresh/vk/vk_common.c | 4 ++-- stuff/shaders/particle.vert | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/refresh/vk/spirv/particle_vert.c b/src/client/refresh/vk/spirv/particle_vert.c index 6e33bcf9..a0206ec6 100644 --- a/src/client/refresh/vk/spirv/particle_vert.c +++ b/src/client/refresh/vk/spirv/particle_vert.c @@ -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, diff --git a/src/client/refresh/vk/vk_common.c b/src/client/refresh/vk/vk_common.c index 671f6b65..c9e30c0f 100644 --- a/src/client/refresh/vk/vk_common.c +++ b/src/client/refresh/vk/vk_common.c @@ -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"); diff --git a/stuff/shaders/particle.vert b/stuff/shaders/particle.vert index 785b555e..40fd6742 100644 --- a/stuff/shaders/particle.vert +++ b/stuff/shaders/particle.vert @@ -22,5 +22,5 @@ void main() { gl_Position = pc.mvpMatrix * vec4(inVertex, 1.0); texCoord = inTexCoord; color = inColor; - aTreshold = 0.0; + aTreshold = 0.5; }