Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project 6: Daniel Alexander Daley-Montgomery (End of Semester) #30

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
295 changes: 295 additions & 0 deletions Instructions.md

Large diffs are not rendered by default.

310 changes: 43 additions & 267 deletions README.md

Large diffs are not rendered by default.

Binary file added bin/Debug/vulkan_grass_rendering.exe
Binary file not shown.
Binary file added bin/Debug/vulkan_grass_rendering.ilk
Binary file not shown.
Binary file added bin/Debug/vulkan_grass_rendering.pdb
Binary file not shown.
Binary file added bin/Release/vulkan_grass_rendering.exe
Binary file not shown.
Binary file added img/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/Capture.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/Culling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/NumBlades.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/Sphere.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scene.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/youtubelink.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 59 additions & 21 deletions src/Blades.cpp
Original file line number Diff line number Diff line change
@@ -1,43 +1,61 @@
#include <vector>
#include "Blades.h"
#include <math.h>
#include "BufferUtils.h"

float generateRandomFloat() {
return rand() / (float)RAND_MAX;
}

Blades::Blades(Device* device, VkCommandPool commandPool, float planeDim) : Model(device, commandPool, {}, {}) {
bool bladesComparator(Blade i, Blade j) { return (i.v0.x + i.v0.z < j.v0.x + j.v0.z); }

Blades::Blades(Device* device, VkCommandPool commandPool, float planeDim, std::vector<Vertex>& verts, std::vector<uint32_t>& indices) : Model(device, commandPool, {}, {}) {
std::vector<Blade> blades;
blades.reserve(NUM_BLADES);
int index = 0;

int dim = (int)sqrt(NUM_BLADES);

for (int i = 0; i < NUM_BLADES; i++) {
Blade currentBlade = Blade();
for (int i = 0; i < dim; i++) {
for (int j = 0; j < dim; j++) {
Blade currentBlade = Blade();

glm::vec3 bladeUp(0.0f, 1.0f, 0.0f);
#if SPHERE

// Generate positions and direction (v0)
float x = (generateRandomFloat() - 0.5f) * planeDim;
float y = 0.0f;
float z = (generateRandomFloat() - 0.5f) * planeDim;
float direction = generateRandomFloat() * 2.f * 3.14159265f;
glm::vec3 bladePosition(x, y, z);
currentBlade.v0 = glm::vec4(bladePosition, direction);
float u = generateRandomFloat() * 2 - 1;
float theta = generateRandomFloat() * 2 * M_PI;
float x = sqrt(1 - u*u) * cos(theta);
float y = sqrt(1 - u*u) * sin(theta) + 4;
float z = u;
glm::vec3 bladeUp = glm::normalize(glm::vec3(x, y, z) - glm::vec3(0, 4, 0));
#else
float x = (i / sqrt(NUM_BLADES) - 0.5f) * planeDim;
float z = (j / sqrt(NUM_BLADES) - 0.5f) * planeDim;
float y = cos(z * 0.1) * 4 + cos((x + z)*0.1+M_PI) * 4;
glm::vec3 bladeUp = glm::vec3(0, 1, 0);
#endif
float direction = generateRandomFloat() * 2.f * M_PI;
glm::vec3 bladePosition(x, y, z);
currentBlade.v0 = glm::vec4(bladePosition, direction);

// Bezier point and height (v1)
float height = MIN_HEIGHT + (generateRandomFloat() * (MAX_HEIGHT - MIN_HEIGHT));
currentBlade.v1 = glm::vec4(bladePosition + bladeUp * height, height);
// Bezier point and height (v1)
float height = MIN_HEIGHT + (generateRandomFloat() * (MAX_HEIGHT - MIN_HEIGHT));
currentBlade.v1 = glm::vec4(bladePosition + bladeUp * height, height);

// Physical model guide and width (v2)
float width = MIN_WIDTH + (generateRandomFloat() * (MAX_WIDTH - MIN_WIDTH));
currentBlade.v2 = glm::vec4(bladePosition + bladeUp * height, width);
// Physical model guide and width (v2)
float width = MIN_WIDTH + (generateRandomFloat() * (MAX_WIDTH - MIN_WIDTH));
currentBlade.v2 = glm::vec4(bladePosition + bladeUp * height, width);

// Up vector and stiffness coefficient (up)
float stiffness = MIN_BEND + (generateRandomFloat() * (MAX_BEND - MIN_BEND));
currentBlade.up = glm::vec4(bladeUp, stiffness);
// Up vector and stiffness coefficient (up)
float stiffness = MIN_BEND + (generateRandomFloat() * (MAX_BEND - MIN_BEND));
currentBlade.up = glm::vec4(bladeUp, stiffness);

blades.push_back(currentBlade);
blades.push_back(currentBlade);
}
}

//std::sort(blades.begin(), blades.end(), bladesComparator);

BladeDrawIndirect indirectDraw;
indirectDraw.vertexCount = NUM_BLADES;
indirectDraw.instanceCount = 1;
Expand All @@ -47,6 +65,26 @@ Blades::Blades(Device* device, VkCommandPool commandPool, float planeDim) : Mode
BufferUtils::CreateBufferFromData(device, commandPool, blades.data(), NUM_BLADES * sizeof(Blade), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, bladesBuffer, bladesBufferMemory);
BufferUtils::CreateBuffer(device, NUM_BLADES * sizeof(Blade), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, culledBladesBuffer, culledBladesBufferMemory);
BufferUtils::CreateBufferFromData(device, commandPool, &indirectDraw, sizeof(BladeDrawIndirect), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, numBladesBuffer, numBladesBufferMemory);

for (int i = 0; i < dim; i++) {
for (int j = 0; j < dim; j++) {
int index = i * dim + j;
Vertex v = Vertex();
v.pos = { blades[index].v0.x,blades[index].v0.y,blades[index].v0.z };
v.color = { 0,0,0 };
v.texCoord = { j*5/(float)dim, i*5/(float)dim };
verts.push_back(v);

if (i != 0 && j != 0) {
indices.push_back(index - dim - 1);
indices.push_back(index - dim);
indices.push_back(index);
indices.push_back(index);
indices.push_back(index - 1);
indices.push_back(index - dim - 1);
}
}
}
}

VkBuffer Blades::GetBladesBuffer() const {
Expand Down
9 changes: 5 additions & 4 deletions src/Blades.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
#include <glm/glm.hpp>
#include <array>
#include "Model.h"
#define SPHERE 0;

constexpr static unsigned int NUM_BLADES = 1 << 13;
constexpr static unsigned int NUM_BLADES = 1 << 19;
constexpr static float MIN_HEIGHT = 1.3f;
constexpr static float MAX_HEIGHT = 2.5f;
constexpr static float MIN_WIDTH = 0.1f;
constexpr static float MAX_WIDTH = 0.14f;
constexpr static float MIN_BEND = 7.0f;
constexpr static float MAX_BEND = 13.0f;
constexpr static float MIN_BEND = 5.0f;
constexpr static float MAX_BEND = 10.0f;

struct Blade {
// Position and direction
Expand Down Expand Up @@ -80,7 +81,7 @@ class Blades : public Model {
VkDeviceMemory numBladesBufferMemory;

public:
Blades(Device* device, VkCommandPool commandPool, float planeDim);
Blades(Device* device, VkCommandPool commandPool, float planeDim, std::vector<Vertex>& verts, std::vector<uint32_t>& indices);
VkBuffer GetBladesBuffer() const;
VkBuffer GetCulledBladesBuffer() const;
VkBuffer GetNumBladesBuffer() const;
Expand Down
170 changes: 155 additions & 15 deletions src/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,41 @@ void Renderer::CreateTimeDescriptorSetLayout() {
}

void Renderer::CreateComputeDescriptorSetLayout() {
// TODO: Create the descriptor set layout for the compute pipeline
// DONE: Create the descriptor set layout for the compute pipeline
// Remember this is like a class definition stating why types of information
VkDescriptorSetLayoutBinding allBlades = {};
allBlades.binding = 0;
allBlades.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
allBlades.descriptorCount = 1;
allBlades.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
allBlades.pImmutableSamplers = nullptr;

VkDescriptorSetLayoutBinding bladesToRender = {};
bladesToRender.binding = 1;
bladesToRender.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
bladesToRender.descriptorCount = 1;
bladesToRender.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
bladesToRender.pImmutableSamplers = nullptr;

VkDescriptorSetLayoutBinding numBlades = {};
numBlades.binding = 2;
numBlades.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
numBlades.descriptorCount = 1;
numBlades.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
numBlades.pImmutableSamplers = nullptr;

std::vector<VkDescriptorSetLayoutBinding> bindings=
{ allBlades, bladesToRender, numBlades };

// Create the descriptor set layout
VkDescriptorSetLayoutCreateInfo layoutInfo = {};
layoutInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
layoutInfo.bindingCount = static_cast<uint32_t>(bindings.size());
layoutInfo.pBindings = bindings.data();

if (vkCreateDescriptorSetLayout(logicalDevice, &layoutInfo, nullptr, &computeDescriptorSetLayout) != VK_SUCCESS) {
throw std::runtime_error("Failed to create descriptor set layout");
}
// will be stored at each binding
}

Expand All @@ -215,7 +248,8 @@ void Renderer::CreateDescriptorPool() {
// Time (compute)
{ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER , 1 },

// TODO: Add any additional types and counts of descriptors you will need to allocate
// DONE: Add any additional types and counts of descriptors you will need to allocate
{ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, static_cast<uint32_t>(3 * scene->GetBlades().size()) }
};

VkDescriptorPoolCreateInfo poolInfo = {};
Expand Down Expand Up @@ -318,7 +352,41 @@ void Renderer::CreateModelDescriptorSets() {
}

void Renderer::CreateGrassDescriptorSets() {
// TODO: Create Descriptor sets for the grass.
// DONE: Create Descriptor sets for the grass.
grassDescriptorSets.resize(scene->GetBlades().size());

VkDescriptorSetLayout layouts[] = { modelDescriptorSetLayout }; //same data that the graphics .vert uses
VkDescriptorSetAllocateInfo allocInfo = {};
allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
allocInfo.descriptorPool = descriptorPool;
allocInfo.descriptorSetCount = static_cast<uint32_t>(scene->GetBlades().size());
allocInfo.pSetLayouts = layouts;

// Allocate descriptor sets
if (vkAllocateDescriptorSets(logicalDevice, &allocInfo, grassDescriptorSets.data()) != VK_SUCCESS) {
throw std::runtime_error("Failed to allocate descriptor sets for Grass shaders");
}

std::vector<VkWriteDescriptorSet> descriptorWrites(scene->GetBlades().size());

for (uint32_t i = 0; i < scene->GetBlades().size(); i++) {
VkDescriptorBufferInfo modelBufferInfo = {};
modelBufferInfo.buffer = scene->GetBlades()[i]->GetModelBuffer();
modelBufferInfo.offset = 0;
modelBufferInfo.range = sizeof(ModelBufferObject);

descriptorWrites[i].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
descriptorWrites[i].dstSet = grassDescriptorSets[i];
descriptorWrites[i].dstBinding = 0;
descriptorWrites[i].dstArrayElement = 0;
descriptorWrites[i].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
descriptorWrites[i].descriptorCount = 1;
descriptorWrites[i].pBufferInfo = &modelBufferInfo;
descriptorWrites[i].pImageInfo = nullptr;
descriptorWrites[i].pTexelBufferView = nullptr;
}

vkUpdateDescriptorSets(logicalDevice, static_cast<uint32_t>(scene->GetBlades().size()), descriptorWrites.data(), 0, nullptr);
// This should involve creating descriptor sets which point to the model matrix of each group of grass blades
}

Expand Down Expand Up @@ -358,7 +426,73 @@ void Renderer::CreateTimeDescriptorSet() {
}

void Renderer::CreateComputeDescriptorSets() {
// TODO: Create Descriptor sets for the compute pipeline
// DONE: Create Descriptor sets for the compute pipeline
computeDescriptorSets.resize(scene->GetBlades().size());

VkDescriptorSetLayout layouts[] = { computeDescriptorSetLayout };
VkDescriptorSetAllocateInfo allocInfo = {};
allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
allocInfo.descriptorPool = descriptorPool;
allocInfo.descriptorSetCount = static_cast<uint32_t> (scene->GetBlades().size());
allocInfo.pSetLayouts = layouts;

// Allocate descriptor sets
if (vkAllocateDescriptorSets(logicalDevice, &allocInfo, computeDescriptorSets.data()) != VK_SUCCESS) {
throw std::runtime_error("Failed to allocate descriptor sets for Compute shaders");
}

std::vector<VkWriteDescriptorSet> descriptorWrites(3 * scene->GetBlades().size());

for (uint32_t i = 0; i < scene->GetBlades().size(); i++) {

VkDescriptorBufferInfo allBladesInfo = {};
allBladesInfo.buffer = scene->GetBlades()[i]->GetBladesBuffer();
allBladesInfo.offset = 0;
allBladesInfo.range = sizeof(Blade) * NUM_BLADES;

descriptorWrites[3 * i + 0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
descriptorWrites[3 * i + 0].dstSet = computeDescriptorSets[0];
descriptorWrites[3 * i + 0].dstBinding = 0;
descriptorWrites[3 * i + 0].dstArrayElement = 0;
descriptorWrites[3 * i + 0].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
descriptorWrites[3 * i + 0].descriptorCount = 1;
descriptorWrites[3 * i + 0].pBufferInfo = &allBladesInfo;
descriptorWrites[3 * i + 0].pImageInfo = nullptr;
descriptorWrites[3 * i + 0].pTexelBufferView = nullptr;

VkDescriptorBufferInfo bladesToRenderInfo = {};
bladesToRenderInfo.buffer = scene->GetBlades()[i]->GetCulledBladesBuffer();
bladesToRenderInfo.offset = 0;
bladesToRenderInfo.range = sizeof(Blade) * NUM_BLADES;

descriptorWrites[3 * i + 1].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
descriptorWrites[3 * i + 1].dstSet = computeDescriptorSets[0];
descriptorWrites[3 * i + 1].dstBinding = 1;
descriptorWrites[3 * i + 1].dstArrayElement = 0;
descriptorWrites[3 * i + 1].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
descriptorWrites[3 * i + 1].descriptorCount = 1;
descriptorWrites[3 * i + 1].pBufferInfo = &bladesToRenderInfo;
descriptorWrites[3 * i + 1].pImageInfo = nullptr;
descriptorWrites[3 * i + 1].pTexelBufferView = nullptr;

VkDescriptorBufferInfo numBladesInfo = {};
numBladesInfo.buffer = scene->GetBlades()[i]->GetNumBladesBuffer();
numBladesInfo.offset = 0;
numBladesInfo.range = sizeof(BladeDrawIndirect);

descriptorWrites[3 * i + 2].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
descriptorWrites[3 * i + 2].dstSet = computeDescriptorSets[0];
descriptorWrites[3 * i + 2].dstBinding = 2;
descriptorWrites[3 * i + 2].dstArrayElement = 0;
descriptorWrites[3 * i + 2].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
descriptorWrites[3 * i + 2].descriptorCount = 1;
descriptorWrites[3 * i + 2].pBufferInfo = &numBladesInfo;
descriptorWrites[3 * i + 2].pImageInfo = nullptr;
descriptorWrites[3 * i + 2].pTexelBufferView = nullptr;
}

// Update descriptor sets
vkUpdateDescriptorSets(logicalDevice, static_cast<uint32_t>(descriptorWrites.size()), descriptorWrites.data(), 0, nullptr);
// The descriptors should point to Storage buffers which will hold the grass blades, the culled grass blades, and the output number of grass blades
}

Expand Down Expand Up @@ -716,8 +850,8 @@ void Renderer::CreateComputePipeline() {
computeShaderStageInfo.module = computeShaderModule;
computeShaderStageInfo.pName = "main";

// TODO: Add the compute dsecriptor set layout you create to this list
std::vector<VkDescriptorSetLayout> descriptorSetLayouts = { cameraDescriptorSetLayout, timeDescriptorSetLayout };
// DONE: Add the compute dsecriptor set layout you create to this list
std::vector<VkDescriptorSetLayout> descriptorSetLayouts = { cameraDescriptorSetLayout, timeDescriptorSetLayout, computeDescriptorSetLayout };

// Create pipeline layout
VkPipelineLayoutCreateInfo pipelineLayoutInfo = {};
Expand Down Expand Up @@ -883,7 +1017,12 @@ void Renderer::RecordComputeCommandBuffer() {
// Bind descriptor set for time uniforms
vkCmdBindDescriptorSets(computeCommandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, computePipelineLayout, 1, 1, &timeDescriptorSet, 0, nullptr);

// TODO: For each group of blades bind its descriptor set and dispatch
// DONE: For each group of blades bind its descriptor set and dispatch
for (int i = 0; i < scene->GetBlades().size(); i++) {
vkCmdBindDescriptorSets(computeCommandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, computePipelineLayout, 2, 1, &computeDescriptorSets[i], 0, nullptr);
uint32_t numBlocksToMakeBlades = (NUM_BLADES + WORKGROUP_SIZE - 1) / WORKGROUP_SIZE;
vkCmdDispatch(computeCommandBuffer, numBlocksToMakeBlades, 1, 1);
}

// ~ End recording ~
if (vkEndCommandBuffer(computeCommandBuffer) != VK_SUCCESS) {
Expand Down Expand Up @@ -926,7 +1065,7 @@ void Renderer::RecordCommandBuffers() {
renderPassInfo.renderArea.extent = swapChain->GetVkExtent();

std::array<VkClearValue, 2> clearValues = {};
clearValues[0].color = { 0.0f, 0.0f, 0.0f, 1.0f };
clearValues[0].color = { 0.5f, 0.7f, 1.0f, 1.0f };
clearValues[1].depthStencil = { 1.0f, 0 };
renderPassInfo.clearValueCount = static_cast<uint32_t>(clearValues.size());
renderPassInfo.pClearValues = clearValues.data();
Expand Down Expand Up @@ -975,14 +1114,14 @@ void Renderer::RecordCommandBuffers() {
for (uint32_t j = 0; j < scene->GetBlades().size(); ++j) {
VkBuffer vertexBuffers[] = { scene->GetBlades()[j]->GetCulledBladesBuffer() };
VkDeviceSize offsets[] = { 0 };
// TODO: Uncomment this when the buffers are populated
// vkCmdBindVertexBuffers(commandBuffers[i], 0, 1, vertexBuffers, offsets);
// DONE: Uncomment this when the buffers are populated
vkCmdBindVertexBuffers(commandBuffers[i], 0, 1, vertexBuffers, offsets);

// TODO: Bind the descriptor set for each grass blades model
// DONE: Bind the descriptor set for each grass blades model
vkCmdBindDescriptorSets(commandBuffers[i], VK_PIPELINE_BIND_POINT_COMPUTE, graphicsPipelineLayout, 1, 1, &grassDescriptorSets[j], 0, nullptr);

// Draw
// TODO: Uncomment this when the buffers are populated
// vkCmdDrawIndirect(commandBuffers[i], scene->GetBlades()[j]->GetNumBladesBuffer(), 0, 1, sizeof(BladeDrawIndirect));
// DONE: Uncomment this to Draw when the buffers are populated
vkCmdDrawIndirect(commandBuffers[i], scene->GetBlades()[j]->GetNumBladesBuffer(), 0, 1, sizeof(BladeDrawIndirect));
}

// End render pass
Expand Down Expand Up @@ -1041,7 +1180,7 @@ void Renderer::Frame() {
Renderer::~Renderer() {
vkDeviceWaitIdle(logicalDevice);

// TODO: destroy any resources you created
// DONE: destroy any resources you created

vkFreeCommandBuffers(logicalDevice, graphicsCommandPool, static_cast<uint32_t>(commandBuffers.size()), commandBuffers.data());
vkFreeCommandBuffers(logicalDevice, computeCommandPool, 1, &computeCommandBuffer);
Expand All @@ -1057,6 +1196,7 @@ Renderer::~Renderer() {
vkDestroyDescriptorSetLayout(logicalDevice, cameraDescriptorSetLayout, nullptr);
vkDestroyDescriptorSetLayout(logicalDevice, modelDescriptorSetLayout, nullptr);
vkDestroyDescriptorSetLayout(logicalDevice, timeDescriptorSetLayout, nullptr);
vkDestroyDescriptorSetLayout(logicalDevice, computeDescriptorSetLayout, nullptr);

vkDestroyDescriptorPool(logicalDevice, descriptorPool, nullptr);

Expand Down
3 changes: 3 additions & 0 deletions src/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ class Renderer {
VkDescriptorSetLayout cameraDescriptorSetLayout;
VkDescriptorSetLayout modelDescriptorSetLayout;
VkDescriptorSetLayout timeDescriptorSetLayout;
VkDescriptorSetLayout computeDescriptorSetLayout;

VkDescriptorPool descriptorPool;

VkDescriptorSet cameraDescriptorSet;
std::vector<VkDescriptorSet> modelDescriptorSets;
std::vector<VkDescriptorSet> computeDescriptorSets;
std::vector<VkDescriptorSet> grassDescriptorSets;
VkDescriptorSet timeDescriptorSet;

VkPipelineLayout graphicsPipelineLayout;
Expand Down
Binary file modified src/images/grass.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading