This project is a glTF 2.0 sample viewer using Vulkan ray tracing. It follows the ray tracing tutorial and combines all chapters into a single example.
The lighting equation is based on the reference glTF PBR implementation from Khronos.
- Load glTF 2.0 files ascii and binary using tiny glTF
- Support for full node hierarchy
- Full implementation of metallic-roughness and specular-glossiness
- IBL lighting using importance light sampling
- Alpha blend and cut-out
- Texture transforms and samplers
- Attributes
- Normal : create geometric normal when not present
- Texture coords : only set 0, project cube map when text coords are missing.
- Tangents : generate tangents and bitangent when missing.
- Color : default (1,1,1,1)
- Extensions
Controls
Action | Description |
---|---|
LMB |
Rotate around the target |
RMB |
Dolly in/out |
MMB |
Pan along view plane |
LMB + Shift |
Dolly in/out |
LMB + Ctrl |
Pan |
LMB + Alt |
Look around |
Mouse wheel |
Dolly in/out |
Mouse wheel + Shift |
Zoom in/out (FOV) |
Space |
Set interest point on the surface under the mouse cursor. |
F10 |
Toggle UI pane. |
Change glTF model
- Drag and drop glTF files (
.gltf
or.glb
) into viewer
Change HDR lighting
- Drag and drop HDR files (
.hdr
) into viewer
git clone https://github.com/nvpro-samples/shared_sources.git
git clone https://github.com/nvpro-samples/shared_external.git
git clone https://github.com/nvpro-samples/vk_raytracing.git
Tags:
- raytracing, GLTF, HDR, tonemapper, picking, BLAS, TLAS, PBR material
Extensions:
- VK_KHR_RAY_QUERY_EXTENSION_NAME
- VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME
- VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME
- VK_KHR_SHADER_CLOCK_EXTENSION_NAME
- VK_KHR_MAINTENANCE3_EXTENSION_NAME
- VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME
- VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME
- VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME
- VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME
- VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME
- VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME
- VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME
- VK_KHR_SWAPCHAIN_EXTENSION_NAME
- VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME
- VK_EXT_DEBUG_UTILS_EXTENSION_NAME
- VK_KHR_SURFACE_EXTENSION_NAME
Model | Link |
---|---|
![]() |
2 Cylinder Engine |
![]() |
Anisotropy |
![]() |
Antique Camera |
![]() |
Boom Box |
![]() |
Corset |
![]() |
Damaged Helmet |
![]() |
Flight Helmet |
![]() |
Metal Rough Spheres |
![]() |
SciFi |
![]() |
SpecGlossVsMetalRough |
![]() |
Unlit |
![]() |
Box Vertex Color |