parent
8668606a14
commit
5029e15ec6
13 changed files with 17 additions and 17 deletions
|
|
@ -424,7 +424,7 @@ public:
|
|||
vkCmdCopyBuffer(copyCmd, stagingBuffer.buffer, compute.storageBuffers.output.buffer, 1, ©Region);
|
||||
// Add an initial release barrier to the graphics queue,
|
||||
// so that when the compute command buffer executes for the first time
|
||||
// it doesn't complain about a lack of a corresponding "release" to it's "acquire"
|
||||
// it doesn't complain about a lack of a corresponding "release" to its "acquire"
|
||||
addGraphicsToComputeBarriers(copyCmd);
|
||||
VulkanExampleBase::flushCommandBuffer(copyCmd, queue, true);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ public:
|
|||
vkCmdBindVertexBuffers(drawCmdBuffers[i], VERTEX_BUFFER_BIND_ID, 1, &model.vertices.buffer, offsets);
|
||||
// Bind mesh index buffer
|
||||
vkCmdBindIndexBuffer(drawCmdBuffers[i], model.indices.buffer, 0, VK_INDEX_TYPE_UINT32);
|
||||
// Render mesh vertex buffer using it's indices
|
||||
// Render mesh vertex buffer using its indices
|
||||
vkCmdDrawIndexed(drawCmdBuffers[i], model.indices.count, 1, 0, 0, 0);
|
||||
|
||||
drawUI(drawCmdBuffers[i]);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
/*
|
||||
This example implements projective cascaded shadow mapping. This technique splits up the camera frustum into
|
||||
multiple frustums with each getting it's own full-res shadow map, implemented as a layered depth-only image.
|
||||
multiple frustums with each getting its own full-res shadow map, implemented as a layered depth-only image.
|
||||
The shader then selects the proper shadow map layer depending on what split of the frustum the depth value
|
||||
to compare fits into.
|
||||
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ public:
|
|||
|
||||
VkCommandBuffer copyCmd = VulkanExampleBase::createCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY, true);
|
||||
|
||||
// Setup buffer copy regions for each face including all of it's miplevels
|
||||
// Setup buffer copy regions for each face including all of its miplevels
|
||||
std::vector<VkBufferImageCopy> bufferCopyRegions;
|
||||
uint32_t offset = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ Setup for the destination mip level (1), with the dimensions for the blit destin
|
|||
imageBlit.dstOffsets[1].z = 1;
|
||||
```
|
||||
|
||||
Before we can blit to this mip level, we need to transition it's image layout to ```TRANSFER_DST```:
|
||||
Before we can blit to this mip level, we need to transition its image layout to ```TRANSFER_DST```:
|
||||
```cpp
|
||||
VkImageSubresourceRange mipSubRange = {};
|
||||
mipSubRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
|
|
|
|||
|
|
@ -703,7 +703,7 @@ public:
|
|||
attachments[0].format = swapChain.colorFormat; // Use the color format selected by the swapchain
|
||||
attachments[0].samples = VK_SAMPLE_COUNT_1_BIT; // We don't use multi sampling in this example
|
||||
attachments[0].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; // Clear this attachment at the start of the render pass
|
||||
attachments[0].storeOp = VK_ATTACHMENT_STORE_OP_STORE; // Keep it's contents after the render pass is finished (for displaying it)
|
||||
attachments[0].storeOp = VK_ATTACHMENT_STORE_OP_STORE; // Keep its contents after the render pass is finished (for displaying it)
|
||||
attachments[0].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; // We don't use stencil, so don't care for load
|
||||
attachments[0].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; // Same for store
|
||||
attachments[0].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; // Layout at render pass start. Initial doesn't matter, so we use undefined
|
||||
|
|
@ -781,7 +781,7 @@ public:
|
|||
VK_CHECK_RESULT(vkCreateRenderPass(device, &renderPassInfo, nullptr, &renderPass));
|
||||
}
|
||||
|
||||
// Vulkan loads it's shaders from an immediate binary representation called SPIR-V
|
||||
// Vulkan loads its shaders from an immediate binary representation called SPIR-V
|
||||
// Shaders are compiled offline from e.g. GLSL using the reference glslang compiler
|
||||
// This function loads such a shader from a binary file and returns a shader module structure
|
||||
VkShaderModule loadSPIRVShader(std::string filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue