From 21fc6552372d40927b29904eabb25061874668ba Mon Sep 17 00:00:00 2001 From: mklefrancois <38076163+mklefrancois@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:03:18 +0200 Subject: [PATCH] Fixing typos and adding more details --- docs/vkrt_tuto_further.md.html | 2 +- docs/vkrt_tuto_instances.md.htm | 5 ++--- docs/vkrt_tuto_jitter_cam.md.htm | 4 ++++ docs/vkrt_tuto_manyhits.md.htm | 4 ++++ docs/vkrt_tutorial.md.htm | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/vkrt_tuto_further.md.html b/docs/vkrt_tuto_further.md.html index 75d4c6d..f15c142 100644 --- a/docs/vkrt_tuto_further.md.html +++ b/docs/vkrt_tuto_further.md.html @@ -91,7 +91,7 @@ Replacing if/else by callable shaders. The code to execute the lighting is done ## [Ray Query](vkrt_tuto_rayquery.md.htm) -Inkoking ray interestion queries directly from the fragment shader to cast shadow rays. +Invoking ray intersection queries directly from the fragment shader to cast shadow rays. * Ray tracing directly from the fragment shader diff --git a/docs/vkrt_tuto_instances.md.htm b/docs/vkrt_tuto_instances.md.htm index b481dc2..0a7a5a5 100644 --- a/docs/vkrt_tuto_instances.md.htm +++ b/docs/vkrt_tuto_instances.md.htm @@ -202,7 +202,7 @@ Finally, here is the Vulkan Device Memory view from Nsight Graphics: We can also modify the code to use the [Vulkan Memory Allocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) from AMD. -Download [vk_mem_alloc.h](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/master/src/vk_mem_alloc.h) from GitHub and add this to the `current` folder. +Download [vk_mem_alloc.h](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/master/src/vk_mem_alloc.h) from GitHub and add this to the `shared_sources` folder. There is already a variation of the allocator for VMA, which is located under [nvpro-samples](https://github.com/nvpro-samples/shared_sources/tree/master/nvvkpp). This allocator has the same simple interface as the `AllocatorDedicated` class in `allocator_dedicated_vkpp.hpp`, but will use VMA for memory management. @@ -249,8 +249,7 @@ In `setup()` VmaAllocatorCreateInfo allocatorInfo = {}; allocatorInfo.physicalDevice = physicalDevice; allocatorInfo.device = device; - allocatorInfo.flags |= - VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT | VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT; + allocatorInfo.flags = VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT; vmaCreateAllocator(&allocatorInfo, &m_vmaAllocator); m_alloc.init(device, m_vmaAllocator); ~~~~ diff --git a/docs/vkrt_tuto_jitter_cam.md.htm b/docs/vkrt_tuto_jitter_cam.md.htm index ac84c7c..d70e41d 100644 --- a/docs/vkrt_tuto_jitter_cam.md.htm +++ b/docs/vkrt_tuto_jitter_cam.md.htm @@ -186,6 +186,10 @@ At the begining of `HelloVulkan::raytrace`, call The application will now antialias the image when ray tracing is enabled. +Adding `resetFrame()` in `HelloVulkan::onResize()` will also take care of clearing the buffer while resizing the window. + + + ## Resetting Frame on UI Change The frame number should also be reset when any parts of the scene change, such as the light direction or the background color. In `renderUI()` in `main.cpp`, check for UI changes and reset the frame number when they happen: diff --git a/docs/vkrt_tuto_manyhits.md.htm b/docs/vkrt_tuto_manyhits.md.htm index ae8b55f..21cbc40 100644 --- a/docs/vkrt_tuto_manyhits.md.htm +++ b/docs/vkrt_tuto_manyhits.md.htm @@ -185,6 +185,10 @@ void main() } ~~~~ +!!! Note + Adding a new shader requires to rerun CMake to added to the project compilation system. + + ## `main.cpp` In `main`, after we set which hit group an instance will use, we can add the data we want to set through the shader record. diff --git a/docs/vkrt_tutorial.md.htm b/docs/vkrt_tutorial.md.htm index 0336950..28294db 100644 --- a/docs/vkrt_tutorial.md.htm +++ b/docs/vkrt_tutorial.md.htm @@ -1601,6 +1601,7 @@ tracing descriptor set. Add the binding of the material buffer and the array of ```` C layout(binding = 1, set = 1, scalar) buffer MatColorBufferObject { WaveFrontMaterial m[]; } materials[]; layout(binding = 3, set = 1) uniform sampler2D textureSamplers[]; +layout(binding = 4, set = 1) buffer MatIndexColorBuffer { int i[]; } matIndex[]; ```` The declaration of the material is the same as that used for the rasterizer and is defined in