diff --git a/examples/screenshot/screenshot.cpp b/examples/screenshot/screenshot.cpp index bc9ca8d6..e5930b43 100644 --- a/examples/screenshot/screenshot.cpp +++ b/examples/screenshot/screenshot.cpp @@ -183,7 +183,7 @@ public: // Take a screenshot from the current swapchain image // This is done using a blit from the swapchain image to a linear image whose memory content is then saved as a ppm image - // Getting the image date directly from a swapchain image wouldn't work as they're usually stored in an implementation dependant optimal tiling format + // Getting the image date directly from a swapchain image wouldn't work as they're usually stored in an implementation dependent optimal tiling format // Note: This requires the swapchain images to be created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT flag (see VulkanSwapChain::create) void saveScreenshot(const char *filename) { @@ -355,7 +355,7 @@ public: // If source is BGR (destination is always RGB) and we can't use blit (which does automatic conversion), we'll have to manually swizzle color components bool colorSwizzle = false; // Check if source is BGR - // Note: Not complete, only contains most common and basic BGR surface formats for demonstation purposes + // Note: Not complete, only contains most common and basic BGR surface formats for demonstration purposes if (!supportsBlit) { std::vector formatsBGR = { VK_FORMAT_B8G8R8A8_SRGB, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_SNORM }; diff --git a/examples/shadowmapping/shadowmapping.cpp b/examples/shadowmapping/shadowmapping.cpp index b2c35607..f1100bea 100644 --- a/examples/shadowmapping/shadowmapping.cpp +++ b/examples/shadowmapping/shadowmapping.cpp @@ -33,7 +33,7 @@ public: float zNear = 1.0f; float zFar = 96.0f; - // Depth bias (and slope) are used to avoid shadowing artefacts + // Depth bias (and slope) are used to avoid shadowing artifacts // Constant depth bias factor (always applied) float depthBiasConstant = 1.25f; // Slope depth bias factor, applied depending on polygon's slope @@ -298,7 +298,7 @@ public: vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); // Set depth bias (aka "Polygon offset") - // Required to avoid shadow mapping artefacts + // Required to avoid shadow mapping artifacts vkCmdSetDepthBias( drawCmdBuffers[i], depthBiasConstant, @@ -423,7 +423,7 @@ public: }; vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, nullptr); - // Scene rendering with shadow map appplied + // Scene rendering with shadow map applied VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets.scene)); writeDescriptorSets = { // Binding 0 : Vertex shader uniform buffer diff --git a/examples/shadowmappingcascade/shadowmappingcascade.cpp b/examples/shadowmappingcascade/shadowmappingcascade.cpp index 6734527a..14b9d362 100644 --- a/examples/shadowmappingcascade/shadowmappingcascade.cpp +++ b/examples/shadowmappingcascade/shadowmappingcascade.cpp @@ -177,7 +177,7 @@ public: } /* - Render the example scene with given command buffer, pipeline layout and dscriptor set + Render the example scene with given command buffer, pipeline layout and descriptor set Used by the scene rendering and depth pass generation command buffer */ void renderScene(VkCommandBuffer commandBuffer, VkPipelineLayout pipelineLayout, VkDescriptorSet descriptorSet, uint32_t cascadeIndex = 0) { @@ -330,7 +330,7 @@ public: VK_CHECK_RESULT(vkCreateFramebuffer(device, &framebufferInfo, nullptr, &cascades[i].frameBuffer)); } - // Shared sampler for cascade deoth reads + // Shared sampler for cascade depth reads VkSamplerCreateInfo sampler = vks::initializers::samplerCreateInfo(); sampler.magFilter = VK_FILTER_LINEAR; sampler.minFilter = VK_FILTER_LINEAR; @@ -381,7 +381,7 @@ public: vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor); // One pass per cascade - // The layer that this pass renders to is defined by the cascade's image view (selected via the cascade's decsriptor set) + // The layer that this pass renders to is defined by the cascade's image view (selected via the cascade's descriptor set) for (uint32_t j = 0; j < SHADOW_MAP_CASCADE_COUNT; j++) { renderPassBeginInfo.framebuffer = cascades[j].frameBuffer; vkCmdBeginRenderPass(drawCmdBuffers[i], &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE); @@ -649,8 +649,8 @@ public: float range = maxZ - minZ; float ratio = maxZ / minZ; - // Calculate split depths based on view camera furstum - // Based on method presentd in https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html + // Calculate split depths based on view camera frustum + // Based on method presented in https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html for (uint32_t i = 0; i < SHADOW_MAP_CASCADE_COUNT; i++) { float p = (i + 1) / static_cast(SHADOW_MAP_CASCADE_COUNT); float log = minZ * std::pow(ratio, p); diff --git a/examples/shadowmappingomni/shadowmappingomni.cpp b/examples/shadowmappingomni/shadowmappingomni.cpp index 3c424595..02e39531 100644 --- a/examples/shadowmappingomni/shadowmappingomni.cpp +++ b/examples/shadowmappingomni/shadowmappingomni.cpp @@ -128,7 +128,7 @@ public: vkDestroyRenderPass(device, offscreenPass.renderPass, nullptr); - // Pipelibes + // Pipelines vkDestroyPipeline(device, pipelines.scene, nullptr); vkDestroyPipeline(device, pipelines.offscreen, nullptr); vkDestroyPipeline(device, pipelines.cubemapDisplay, nullptr); diff --git a/examples/ssao/ssao.cpp b/examples/ssao/ssao.cpp index 7403b75a..b5fbde4f 100644 --- a/examples/ssao/ssao.cpp +++ b/examples/ssao/ssao.cpp @@ -500,7 +500,7 @@ public: Offscreen SSAO generation */ { - // Clear values for all attachments written in the fragment sahder + // Clear values for all attachments written in the fragment shader std::vector clearValues(4); clearValues[0].color = { { 0.0f, 0.0f, 0.0f, 1.0f } }; clearValues[1].color = { { 0.0f, 0.0f, 0.0f, 1.0f } }; diff --git a/examples/subpasses/subpasses.cpp b/examples/subpasses/subpasses.cpp index 768a7e9d..12f2a92d 100644 --- a/examples/subpasses/subpasses.cpp +++ b/examples/subpasses/subpasses.cpp @@ -12,7 +12,7 @@ * the same pixel position. * * This is a feature that was especially designed for tile-based-renderers -* (mostly mobile GPUs) and is a new optomization feature in Vulkan for those GPU types. +* (mostly mobile GPUs) and is a new optimization feature in Vulkan for those GPU types. * */ @@ -466,7 +466,7 @@ public: VkDeviceSize offsets[1] = { 0 }; // First sub pass - // Renders the components of the scene to the G-Buffer atttachments + // Renders the components of the scene to the G-Buffer attachments { vks::debugmarker::beginRegion(drawCmdBuffers[i], "Subpass 0: Deferred G-Buffer creation", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)); @@ -492,7 +492,7 @@ public: } // Third subpass - // Render transparent geometry using a forward pass that compares against depth generted during G-Buffer fill + // Render transparent geometry using a forward pass that compares against depth generated during G-Buffer fill { vks::debugmarker::beginRegion(drawCmdBuffers[i], "Subpass 2: Forward transparency", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)); diff --git a/examples/terraintessellation/terraintessellation.cpp b/examples/terraintessellation/terraintessellation.cpp index 0f3b3f41..52ff4944 100644 --- a/examples/terraintessellation/terraintessellation.cpp +++ b/examples/terraintessellation/terraintessellation.cpp @@ -40,7 +40,6 @@ public: } textures; struct { - //vks::Model terrain; vkglTF::Model skysphere; } models; diff --git a/examples/tessellation/tessellation.cpp b/examples/tessellation/tessellation.cpp index d0613e5f..18761158 100644 --- a/examples/tessellation/tessellation.cpp +++ b/examples/tessellation/tessellation.cpp @@ -284,7 +284,7 @@ public: { uboTessEval.projection = camera.matrices.perspective; uboTessEval.modelView = camera.matrices.view; - // Tessellation evaulation uniform block + // Tessellation evaluation uniform block memcpy(uniformBuffers.tessEval.mapped, &uboTessEval, sizeof(uboTessEval)); // Tessellation control uniform block memcpy(uniformBuffers.tessControl.mapped, &uboTessControl, sizeof(uboTessControl)); diff --git a/examples/textoverlay/textoverlay.cpp b/examples/textoverlay/textoverlay.cpp index d54eb70b..85b70727 100644 --- a/examples/textoverlay/textoverlay.cpp +++ b/examples/textoverlay/textoverlay.cpp @@ -432,7 +432,7 @@ public: // Use subpass dependencies for image layout transitions VkSubpassDependency subpassDependencies[2] = {}; - // Transition from final to initial (VK_SUBPASS_EXTERNAL refers to all commmands executed outside of the actual renderpass) + // Transition from final to initial (VK_SUBPASS_EXTERNAL refers to all commands executed outside of the actual renderpass) subpassDependencies[0].srcSubpass = VK_SUBPASS_EXTERNAL; subpassDependencies[0].dstSubpass = 0; subpassDependencies[0].srcStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; @@ -721,7 +721,6 @@ public: textOverlay->addText("A cube", projected.x, projected.y, TextOverlay::alignCenter); #if defined(__ANDROID__) - // toto #else textOverlay->addText("Press \"space\" to toggle text overlay", 5.0f, 65.0f, TextOverlay::alignLeft); textOverlay->addText("Hold middle mouse button and drag to move", 5.0f, 85.0f, TextOverlay::alignLeft);