Removed unused compute shader ubo members

This commit is contained in:
Sascha Willems 2019-10-23 20:45:54 +02:00
parent b3214c521b
commit eddd724e7c
5 changed files with 1 additions and 9 deletions

View file

@ -18,8 +18,6 @@ layout (local_size_x = 256) in;
layout (binding = 1) uniform UBO layout (binding = 1) uniform UBO
{ {
float deltaT; float deltaT;
float destX;
float destY;
int particleCount; int particleCount;
} ubo; } ubo;

View file

@ -17,8 +17,6 @@ layout (local_size_x = 256) in;
layout (binding = 1) uniform UBO layout (binding = 1) uniform UBO
{ {
float deltaT; float deltaT;
float destX;
float destY;
int particleCount; int particleCount;
} ubo; } ubo;

View file

@ -1,7 +1,7 @@
/* /*
* Vulkan Example - Compute shader N-body simulation using two passes and shared compute shader memory * Vulkan Example - Compute shader N-body simulation using two passes and shared compute shader memory
* *
* Copyright (C) 2016 by Sascha Willems - www.saschawillems.de * Copyright (C) by Sascha Willems - www.saschawillems.de
* *
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/ */
@ -81,8 +81,6 @@ public:
VkDescriptorSet descriptorSetBlur; VkDescriptorSet descriptorSetBlur;
struct computeUBO { // Compute shader uniform block object struct computeUBO { // Compute shader uniform block object
float deltaT; // Frame delta time float deltaT; // Frame delta time
float destX; // x position of the attractor
float destY; // y position of the attractor
int32_t particleCount; int32_t particleCount;
} ubo; } ubo;
} compute; } compute;
@ -682,8 +680,6 @@ public:
void updateComputeUniformBuffers() void updateComputeUniformBuffers()
{ {
compute.ubo.deltaT = paused ? 0.0f : frameTimer * 0.05f; compute.ubo.deltaT = paused ? 0.0f : frameTimer * 0.05f;
compute.ubo.destX = sin(glm::radians(timer * 360.0f)) * 0.75f;
compute.ubo.destY = 0.0f;
memcpy(compute.uniformBuffer.mapped, &compute.ubo, sizeof(compute.ubo)); memcpy(compute.uniformBuffer.mapped, &compute.ubo, sizeof(compute.ubo));
} }