Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7504395
Clean up api sample base class interfaces
SaschaWillems Mar 17, 2024
9214e1e
Revert "Clean up api sample base class interfaces"
SaschaWillems Mar 17, 2024
6ee9bed
Merge branch 'main' of https://github.com/SaschaWillems/Vulkan-Samples
SaschaWillems May 2, 2024
fdc6969
Merge branch 'main' of https://github.com/SaschaWillems/Vulkan-Samples
SaschaWillems May 7, 2024
c93d360
Merge branch 'main' of https://github.com/SaschaWillems/Vulkan-Samples
SaschaWillems May 21, 2024
2705658
Merge branch 'main' of https://github.com/SaschaWillems/Vulkan-Samples
SaschaWillems Jun 4, 2024
bbf46e5
Merge branch 'main' of https://github.com/SaschaWillems/Vulkan-Samples
SaschaWillems Jun 7, 2024
434c9cd
Added sample for VK_KHR_ray_tracing_position_fetch
SaschaWillems Jun 8, 2024
b2b635b
Added argument for passing additional buffer usage flags to glTF loading
SaschaWillems Jun 8, 2024
4299a27
Fix build flags
SaschaWillems Jun 9, 2024
700f320
Added option to add additional buffer usage flags when loading glTF s…
SaschaWillems Jun 9, 2024
50e7606
Load full glTF scene instead of just one sub mesh
SaschaWillems Jun 9, 2024
9657ecf
Offset scene and adjust camera
SaschaWillems Jun 10, 2024
1e396ee
Update HLSL shader
SaschaWillems Jun 10, 2024
f7e3cea
Code cleanup
SaschaWillems Jun 10, 2024
6ace83a
Code cleanup and simplificaiton
SaschaWillems Jun 11, 2024
8c7092a
Added new overload for adding triangle geometry to an acceleration st…
SaschaWillems Jun 12, 2024
4b8bf85
Add display mode selection
SaschaWillems Jun 15, 2024
0bd2c6a
Added sample to documentation
SaschaWillems Jun 15, 2024
d2d606e
Fix typo
SaschaWillems Jun 15, 2024
4fce5b5
Add index type argument
SaschaWillems Jun 15, 2024
9a551fd
Use index type from glTF mesh
SaschaWillems Jun 15, 2024
6899a53
Added SPIR-V files for HLSL shaders
SaschaWillems Jun 15, 2024
627c351
Add readme/tutorial
SaschaWillems Jun 15, 2024
97a1de2
Trying to fix clang format
SaschaWillems Jun 15, 2024
4089ed3
Reowkr additional buffer flags as per review, no longer use local var…
SaschaWillems Jun 17, 2024
03b04f5
Fix typo, new line at end of file required to get past pre-commit
SaschaWillems Jun 17, 2024
98817c8
Move strided device address regions for shader binding tables out of …
SaschaWillems Jun 17, 2024
708ef3f
Make variables const
SaschaWillems Jun 17, 2024
b014de5
Port to HPPApiVulkanSample
asuessenbach Jun 18, 2024
b68a87a
Fixing clang-format
SaschaWillems Jun 18, 2024
19d1297
Use vkb::core::Buffer const & in AccelerationStructure::add_triangle_…
asuessenbach Jun 18, 2024
0059477
Point assets submodule to latest commit
SaschaWillems Jul 29, 2024
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
1 change: 1 addition & 0 deletions antora/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
** xref:samples/extensions/ray_tracing_extended/README.adoc[Raytracing extended]
** xref:samples/extensions/ray_queries/README.adoc[Ray queries]
** xref:samples/extensions/ray_tracing_reflection/README.adoc[Ray tracing reflection]
** xref:samples/extensions/ray_tracing_position_fetch/README.adoc[Ray tracing position fetch]
** xref:samples/extensions/shader_object/README.adoc[Shader Object]
** xref:samples/extensions/shader_debugprintf/README.adoc[Shader Debug Printf]
** xref:samples/extensions/sparse_image/README.adoc[Sparse Image]
Expand Down
4 changes: 2 additions & 2 deletions framework/api_vulkan_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1308,11 +1308,11 @@ Texture ApiVulkanSample::load_texture_cubemap(const std::string &file, vkb::sg::
return texture;
}

std::unique_ptr<vkb::sg::SubMesh> ApiVulkanSample::load_model(const std::string &file, uint32_t index, bool storage_buffer)
std::unique_ptr<vkb::sg::SubMesh> ApiVulkanSample::load_model(const std::string &file, uint32_t index, bool storage_buffer, VkBufferUsageFlags additional_buffer_usage_flags)
{
vkb::GLTFLoader loader{get_device()};

std::unique_ptr<vkb::sg::SubMesh> model = loader.read_model_from_file(file, index, storage_buffer);
std::unique_ptr<vkb::sg::SubMesh> model = loader.read_model_from_file(file, index, storage_buffer, additional_buffer_usage_flags);

if (!model)
{
Expand Down
3 changes: 2 additions & 1 deletion framework/api_vulkan_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ class ApiVulkanSample : public vkb::VulkanSample<vkb::BindingType::C>
* @param file The filename of the model to load
* @param index The index of the model to load from the GLTF file (default: 0)
* @param storage_buffer Set true to store model in SSBO
* @param additional_buffer_usage_flags Additional buffer usage flags to be applied to vertex and index buffers
*/
std::unique_ptr<vkb::sg::SubMesh> load_model(const std::string &file, uint32_t index = 0, bool storage_buffer = false);
std::unique_ptr<vkb::sg::SubMesh> load_model(const std::string &file, uint32_t index = 0, bool storage_buffer = false, VkBufferUsageFlags additional_buffer_usage_flags = 0);

/**
* @brief Records the necessary drawing commands to a command buffer
Expand Down
26 changes: 26 additions & 0 deletions framework/core/acceleration_structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,32 @@ uint64_t AccelerationStructure::add_triangle_geometry(std::unique_ptr<vkb::core:
return index;
}

uint64_t AccelerationStructure::add_triangle_geometry(vkb::core::Buffer const &vertex_buffer,
vkb::core::Buffer const &index_buffer,
vkb::core::Buffer const &transform_buffer,
uint32_t triangle_count, uint32_t max_vertex,
VkDeviceSize vertex_stride, uint32_t transform_offset,
VkFormat vertex_format, VkIndexType index_type,
VkGeometryFlagsKHR flags)
{
VkAccelerationStructureGeometryKHR geometry{};
geometry.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR;
geometry.geometryType = VK_GEOMETRY_TYPE_TRIANGLES_KHR;
geometry.flags = flags;
geometry.geometry.triangles.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR;
geometry.geometry.triangles.vertexFormat = vertex_format;
geometry.geometry.triangles.maxVertex = max_vertex;
geometry.geometry.triangles.vertexStride = vertex_stride;
geometry.geometry.triangles.indexType = index_type;
geometry.geometry.triangles.vertexData.deviceAddress = vertex_buffer.get_device_address();
geometry.geometry.triangles.indexData.deviceAddress = index_buffer.get_device_address();
geometry.geometry.triangles.transformData.deviceAddress = transform_buffer.get_device_address();

uint64_t index = geometries.size();
geometries.insert({index, {geometry, triangle_count, transform_offset}});
return index;
}

void AccelerationStructure::update_triangle_geometry(uint64_t triangleUUID,
std::unique_ptr<vkb::core::Buffer> &vertex_buffer,
std::unique_ptr<vkb::core::Buffer> &index_buffer,
Expand Down
11 changes: 11 additions & 0 deletions framework/core/acceleration_structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ class AccelerationStructure
uint64_t index_buffer_data_address = 0,
uint64_t transform_buffer_data_address = 0);

uint64_t add_triangle_geometry(vkb::core::Buffer const &vertex_buffer,
vkb::core::Buffer const &index_buffer,
vkb::core::Buffer const &transform_buffer,
uint32_t triangle_count,
uint32_t max_vertex,
VkDeviceSize vertex_stride,
uint32_t transform_offset = 0,
VkFormat vertex_format = VK_FORMAT_R32G32B32_SFLOAT,
VkIndexType index_type = VK_INDEX_TYPE_UINT32,
VkGeometryFlagsKHR flags = VK_GEOMETRY_OPAQUE_BIT_KHR);

void update_triangle_geometry(uint64_t triangleUUID, std::unique_ptr<vkb::core::Buffer> &vertex_buffer,
std::unique_ptr<vkb::core::Buffer> &index_buffer,
std::unique_ptr<vkb::core::Buffer> &transform_buffer,
Expand Down
2 changes: 1 addition & 1 deletion framework/core/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ VkDeviceSize Buffer::get_size() const
return size;
}

uint64_t Buffer::get_device_address()
uint64_t Buffer::get_device_address() const
{
VkBufferDeviceAddressInfoKHR buffer_device_address_info{};
buffer_device_address_info.sType = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO;
Expand Down
2 changes: 1 addition & 1 deletion framework/core/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Buffer : public allocated::Allocated<VkBuffer>
/**
* @return Return the buffer's device address (note: requires that the buffer has been created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage fla)
*/
uint64_t get_device_address();
uint64_t get_device_address() const;

private:
VkDeviceSize size{0};
Expand Down
34 changes: 24 additions & 10 deletions framework/gltf_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ GLTFLoader::GLTFLoader(Device &device) :
{
}

std::unique_ptr<sg::Scene> GLTFLoader::read_scene_from_file(const std::string &file_name, int scene_index)
std::unique_ptr<sg::Scene> GLTFLoader::read_scene_from_file(const std::string &file_name, int scene_index, VkBufferUsageFlags additional_buffer_usage_flags)
{
std::string err;
std::string warn;
Expand Down Expand Up @@ -445,10 +445,10 @@ std::unique_ptr<sg::Scene> GLTFLoader::read_scene_from_file(const std::string &f
model_path.clear();
}

return std::make_unique<sg::Scene>(load_scene(scene_index));
return std::make_unique<sg::Scene>(load_scene(scene_index, additional_buffer_usage_flags));
}

std::unique_ptr<sg::SubMesh> GLTFLoader::read_model_from_file(const std::string &file_name, uint32_t index, bool storage_buffer)
std::unique_ptr<sg::SubMesh> GLTFLoader::read_model_from_file(const std::string &file_name, uint32_t index, bool storage_buffer, VkBufferUsageFlags additional_buffer_usage_flags)
{
std::string err;
std::string warn;
Expand Down Expand Up @@ -487,10 +487,10 @@ std::unique_ptr<sg::SubMesh> GLTFLoader::read_model_from_file(const std::string
model_path.clear();
}

return std::move(load_model(index, storage_buffer));
return std::move(load_model(index, storage_buffer, additional_buffer_usage_flags));
}

sg::Scene GLTFLoader::load_scene(int scene_index)
sg::Scene GLTFLoader::load_scene(int scene_index, VkBufferUsageFlags additional_buffer_usage_flags)
{
auto scene = sg::Scene();

Expand Down Expand Up @@ -751,7 +751,7 @@ sg::Scene GLTFLoader::load_scene(int scene_index)

core::Buffer buffer{device,
vertex_data.size(),
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | additional_buffer_usage_flags,
VMA_MEMORY_USAGE_CPU_TO_GPU};
buffer.update(vertex_data);
buffer.set_debug_name(fmt::format("'{}' mesh, primitive #{}: '{}' vertex buffer",
Expand Down Expand Up @@ -794,7 +794,7 @@ sg::Scene GLTFLoader::load_scene(int scene_index)

submesh->index_buffer = std::make_unique<core::Buffer>(device,
index_data.size(),
VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
VK_BUFFER_USAGE_INDEX_BUFFER_BIT | additional_buffer_usage_flags,
VMA_MEMORY_USAGE_GPU_TO_CPU);
submesh->index_buffer->set_debug_name(fmt::format("'{}' mesh, primitive #{}: index buffer",
gltf_mesh.name, i_primitive));
Expand Down Expand Up @@ -1085,7 +1085,7 @@ sg::Scene GLTFLoader::load_scene(int scene_index)
return scene;
}

std::unique_ptr<sg::SubMesh> GLTFLoader::load_model(uint32_t index, bool storage_buffer)
std::unique_ptr<sg::SubMesh> GLTFLoader::load_model(uint32_t index, bool storage_buffer, VkBufferUsageFlags additional_buffer_usage_flags)
{
auto submesh = std::make_unique<sg::SubMesh>();

Expand Down Expand Up @@ -1118,6 +1118,8 @@ std::unique_ptr<sg::SubMesh> GLTFLoader::load_model(uint32_t index, bool storage
auto &buffer_view = model.bufferViews[accessor.bufferView];
pos = reinterpret_cast<const float *>(&(model.buffers[buffer_view.buffer].data[accessor.byteOffset + buffer_view.byteOffset]));

submesh->vertices_count = static_cast<uint32_t>(vertex_count);

if (gltf_primitive.attributes.find("NORMAL") != gltf_primitive.attributes.end())
{
accessor = model.accessors[gltf_primitive.attributes.find("NORMAL")->second];
Expand Down Expand Up @@ -1190,9 +1192,15 @@ std::unique_ptr<sg::SubMesh> GLTFLoader::load_model(uint32_t index, bool storage

core::Buffer stage_buffer = vkb::core::Buffer::create_staging_buffer(device, vertex_data);

VkBufferUsageFlags buffer_usage_flags = VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
if (additional_buffer_usage_flags)
{
buffer_usage_flags |= additional_buffer_usage_flags;
}

core::Buffer buffer{device,
vertex_data.size() * sizeof(Vertex),
VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
buffer_usage_flags,
VMA_MEMORY_USAGE_GPU_ONLY};

command_buffer.copy_buffer(stage_buffer, buffer, vertex_data.size() * sizeof(Vertex));
Expand Down Expand Up @@ -1260,9 +1268,15 @@ std::unique_ptr<sg::SubMesh> GLTFLoader::load_model(uint32_t index, bool storage
{
core::Buffer stage_buffer = vkb::core::Buffer::create_staging_buffer(device, index_data);

VkBufferUsageFlags buffer_usage_flags = VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT;
if (additional_buffer_usage_flags)
{
buffer_usage_flags |= additional_buffer_usage_flags;
}

submesh->index_buffer = std::make_unique<core::Buffer>(device,
index_data.size(),
VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT,
buffer_usage_flags,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

VMA_MEMORY_USAGE_GPU_ONLY);

command_buffer.copy_buffer(stage_buffer, *submesh->index_buffer, index_data.size());
Expand Down
10 changes: 6 additions & 4 deletions framework/gltf_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#include "timer.h"

#include "vulkan/vulkan.h"

#define KHR_LIGHTS_PUNCTUAL_EXTENSION "KHR_lights_punctual"

namespace vkb
Expand Down Expand Up @@ -73,13 +75,13 @@ class GLTFLoader

virtual ~GLTFLoader() = default;

std::unique_ptr<sg::Scene> read_scene_from_file(const std::string &file_name, int scene_index = -1);
std::unique_ptr<sg::Scene> read_scene_from_file(const std::string &file_name, int scene_index = -1, VkBufferUsageFlags additional_buffer_usage_flags = 0);

/**
* @brief Loads the first model from a GLTF file for use in simpler samples
* makes use of the Vertex struct in vulkan_example_base.h
*/
std::unique_ptr<sg::SubMesh> read_model_from_file(const std::string &file_name, uint32_t index, bool storage_buffer = false);
std::unique_ptr<sg::SubMesh> read_model_from_file(const std::string &file_name, uint32_t index, bool storage_buffer = false, VkBufferUsageFlags additional_buffer_usage_flags = 0);

protected:
virtual std::unique_ptr<sg::Node> parse_node(const tinygltf::Node &gltf_node, size_t index) const;
Expand Down Expand Up @@ -132,8 +134,8 @@ class GLTFLoader
static std::unordered_map<std::string, bool> supported_extensions;

private:
sg::Scene load_scene(int scene_index = -1);
sg::Scene load_scene(int scene_index = -1, VkBufferUsageFlags additional_buffer_usage_flags = 0);

std::unique_ptr<sg::SubMesh> load_model(uint32_t index, bool storage_buffer = false);
std::unique_ptr<sg::SubMesh> load_model(uint32_t index, bool storage_buffer = false, VkBufferUsageFlags additional_buffer_usage_flags = 0);
};
} // namespace vkb
5 changes: 3 additions & 2 deletions framework/hpp_api_vulkan_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,11 +1050,12 @@ HPPTexture HPPApiVulkanSample::load_texture_cubemap(const std::string &file, vkb
return texture;
}

std::unique_ptr<vkb::scene_graph::components::HPPSubMesh> HPPApiVulkanSample::load_model(const std::string &file, uint32_t index)
std::unique_ptr<vkb::scene_graph::components::HPPSubMesh>
HPPApiVulkanSample::load_model(const std::string &file, uint32_t index, bool storage_buffer, vk::BufferUsageFlags additional_buffer_usage_flags)
{
vkb::HPPGLTFLoader loader{get_device()};

std::unique_ptr<vkb::scene_graph::components::HPPSubMesh> model = loader.read_model_from_file(file, index);
std::unique_ptr<vkb::scene_graph::components::HPPSubMesh> model = loader.read_model_from_file(file, index, storage_buffer, additional_buffer_usage_flags);

if (!model)
{
Expand Down
5 changes: 4 additions & 1 deletion framework/hpp_api_vulkan_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ class HPPApiVulkanSample : public vkb::VulkanSample<vkb::BindingType::Cpp>
* @brief Loads in a single model from a GLTF file
* @param file The filename of the model to load
* @param index The index of the model to load from the GLTF file (default: 0)
* @param storage_buffer Set true to store model in SSBO
* @param additional_buffer_usage_flags Additional buffer usage flags to be applied to vertex and index buffers
*/
std::unique_ptr<vkb::scene_graph::components::HPPSubMesh> load_model(const std::string &file, uint32_t index = 0);
std::unique_ptr<vkb::scene_graph::components::HPPSubMesh> load_model(
const std::string &file, uint32_t index = 0, bool storage_buffer = false, vk::BufferUsageFlags additional_buffer_usage_flags = {});

/**
* @brief Records the necessary drawing commands to a command buffer
Expand Down
8 changes: 4 additions & 4 deletions framework/hpp_gltf_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ class HPPGLTFLoader : private vkb::GLTFLoader
GLTFLoader(reinterpret_cast<vkb::Device &>(device))
{}

std::unique_ptr<vkb::scene_graph::components::HPPSubMesh> read_model_from_file(const std::string &file_name, uint32_t index)
std::unique_ptr<vkb::scene_graph::components::HPPSubMesh> read_model_from_file(
const std::string &file_name, uint32_t index, bool storage_buffer = false, vk::BufferUsageFlags additional_buffer_usage_flags = {})
{
return std::unique_ptr<vkb::scene_graph::components::HPPSubMesh>(
reinterpret_cast<vkb::scene_graph::components::HPPSubMesh *>(
vkb::GLTFLoader::read_model_from_file(file_name, index).release()));
return std::unique_ptr<vkb::scene_graph::components::HPPSubMesh>(reinterpret_cast<vkb::scene_graph::components::HPPSubMesh *>(
vkb::GLTFLoader::read_model_from_file(file_name, index, storage_buffer, static_cast<VkBufferUsageFlags>(additional_buffer_usage_flags)).release()));
}
};
} // namespace vkb
8 changes: 7 additions & 1 deletion samples/extensions/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ Then it uses that dynamic sample rate map as a base for the next frame.
Render a simple scene showing the basics of ray tracing, including reflection and shadow rays.
The sample creates some geometries and create a bottom acceleration structure for each, then make instances of those, using different materials and placing them at different locations.

=== xref:./{extension_samplespath}ray_tracing_position_fetch/README.adoc[Ray tracing position fetch]

*Extensions*: https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VK_KHR_ray_tracing_position_fetch[`VK_KHR_ray_tracing_position_fetch`]

Shows how to use the ray tracing position fetch extension to directly access vertex positions for a hit triangle from the acceleration structure, instead of having to explicitly pass and unpack that information

=== xref:./{extension_samplespath}portability/README.adoc[Portability]

*Extensions*: https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VK_KHR_portability_subset[`VK_KHR_portability_subset`]
Expand Down Expand Up @@ -272,4 +278,4 @@ Demonstrates how to use https://en.wikipedia.org/wiki/Printf[Printf] statements

*Extension:* https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_extended_dynamic_state3.html[`VK_EXT_extended_dynamic_state3`]

Rendering using primitive clipping and depth clipping configured by dynamic pipeline state.
Rendering using primitive clipping and depth clipping configured by dynamic pipeline state.
35 changes: 35 additions & 0 deletions samples/extensions/ray_tracing_position_fetch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (c) 2024, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 the "License";
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH)
get_filename_component(CATEGORY_NAME ${PARENT_DIR} NAME)

add_sample(
ID ${FOLDER_NAME}
CATEGORY ${CATEGORY_NAME}
AUTHOR "Sascha Willems"
NAME "Ray tracing position fetch"
DESCRIPTION "Uses the VK_KHR_ray_tracing_position_fetch to fetch vertex positions from an acceleration structure"
SHADER_FILES_GLSL
"ray_tracing_position_fetch/glsl/closesthit.rchit"
"ray_tracing_position_fetch/glsl/miss.rmiss"
"ray_tracing_position_fetch/glsl/raygen.rgen"
SHADER_FILES_HLSL
"ray_tracing_position_fetch/hlsl/closesthit.rchit.hlsl"
"ray_tracing_position_fetch/hlsl/miss.rmiss.hlsl"
"ray_tracing_position_fetch/hlsl/raygen.rgen.hlsl")
Loading