Showing preview only (4,091K chars total). Download the full file or copy to clipboard to get everything.
Repository: TeamWisp/WispRenderer
Branch: master
Commit: 1f1493f9c903
Files: 279
Total size: 3.9 MB
Directory structure:
gitextract_vk1cvjis/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── design-change.md
│ │ ├── feature_request.md
│ │ └── re-factor-request.md
│ └── PULL_REQUEST_TEMPLATE/
│ └── pull_request_template.md
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── Jenkinsfile
├── LICENSE
├── README.md
├── imgui.ini
├── resources/
│ ├── alien_lights.json
│ ├── shaders/
│ │ ├── deferred_composition_pass.hlsl
│ │ ├── deferred_geometry_pass.hlsl
│ │ ├── denoising_SVGF.hlsl
│ │ ├── denoising_reflections.hlsl
│ │ ├── denoising_spatial_reconstruction.hlsl
│ │ ├── dxr_ambient_occlusion.hlsl
│ │ ├── dxr_functions.hlsl
│ │ ├── dxr_global.hlsl
│ │ ├── dxr_pathtracer_accumulation.hlsl
│ │ ├── dxr_pathtracer_entries.hlsl
│ │ ├── dxr_pathtracer_functions.hlsl
│ │ ├── dxr_pathtracer_main.hlsl
│ │ ├── dxr_raytracing.hlsl
│ │ ├── dxr_reflection_entries.hlsl
│ │ ├── dxr_reflection_functions.hlsl
│ │ ├── dxr_reflection_main.hlsl
│ │ ├── dxr_shadow_entries.hlsl
│ │ ├── dxr_shadow_functions.hlsl
│ │ ├── dxr_shadow_main.hlsl
│ │ ├── dxr_structs.hlsl
│ │ ├── dxr_texture_lod.hlsl
│ │ ├── fullscreen_quad.hlsl
│ │ ├── generate_mips_cs.hlsl
│ │ ├── lighting.hlsl
│ │ ├── material_util.hlsl
│ │ ├── math.hlsl
│ │ ├── pbr_brdf_lut.hlsl
│ │ ├── pbr_cubemap_conversion.hlsl
│ │ ├── pbr_cubemap_convolution.hlsl
│ │ ├── pbr_prefilter_env_map.hlsl
│ │ ├── pbr_util.hlsl
│ │ ├── pp_bloom_blur.hlsl
│ │ ├── pp_bloom_blur_horizontal.hlsl
│ │ ├── pp_bloom_blur_vertical.hlsl
│ │ ├── pp_bloom_composition.hlsl
│ │ ├── pp_bloom_extract_bright.hlsl
│ │ ├── pp_bloom_util.hlsl
│ │ ├── pp_dof_bokeh.hlsl
│ │ ├── pp_dof_bokeh_post_filter.hlsl
│ │ ├── pp_dof_coc.hlsl
│ │ ├── pp_dof_composition.hlsl
│ │ ├── pp_dof_compute_near_mask.hlsl
│ │ ├── pp_dof_dilate.hlsl
│ │ ├── pp_dof_downscale.hlsl
│ │ ├── pp_dof_properties.hlsl
│ │ ├── pp_dof_util.hlsl
│ │ ├── pp_fxaa.hlsl
│ │ ├── pp_hdr_util.hlsl
│ │ ├── pp_tonemapping.hlsl
│ │ ├── pp_util.hlsl
│ │ └── rand_util.hlsl
│ ├── sponza_lights.json
│ └── viknell_lights.json
├── scripts/
│ └── JenkinsWebhook.bat
├── src/
│ ├── constant_buffer_pool.cpp
│ ├── constant_buffer_pool.hpp
│ ├── d3d12/
│ │ ├── d3d12_acceleration_structure..cpp
│ │ ├── d3d12_command_list.cpp
│ │ ├── d3d12_command_queue.cpp
│ │ ├── d3d12_constant_buffer_pool.cpp
│ │ ├── d3d12_constant_buffer_pool.hpp
│ │ ├── d3d12_defines.hpp
│ │ ├── d3d12_descriptor_heap.cpp
│ │ ├── d3d12_descriptors_allocations.cpp
│ │ ├── d3d12_descriptors_allocations.hpp
│ │ ├── d3d12_device.cpp
│ │ ├── d3d12_dynamic_descriptor_heap.cpp
│ │ ├── d3d12_dynamic_descriptor_heap.hpp
│ │ ├── d3d12_enums.hpp
│ │ ├── d3d12_fence.cpp
│ │ ├── d3d12_functions.hpp
│ │ ├── d3d12_heap.cpp
│ │ ├── d3d12_indirect_command_buffer.cpp
│ │ ├── d3d12_material_pool.cpp
│ │ ├── d3d12_material_pool.hpp
│ │ ├── d3d12_model_pool.cpp
│ │ ├── d3d12_model_pool.hpp
│ │ ├── d3d12_pipeline_state.cpp
│ │ ├── d3d12_readback_buffer.cpp
│ │ ├── d3d12_render_target.cpp
│ │ ├── d3d12_render_window.cpp
│ │ ├── d3d12_renderer.cpp
│ │ ├── d3d12_renderer.hpp
│ │ ├── d3d12_resource_pool_texture.cpp
│ │ ├── d3d12_resource_pool_texture.hpp
│ │ ├── d3d12_root_signature.cpp
│ │ ├── d3d12_rt_descriptor_heap.cpp
│ │ ├── d3d12_rt_descriptor_heap.hpp
│ │ ├── d3d12_settings.hpp
│ │ ├── d3d12_shader.cpp
│ │ ├── d3d12_shader_table.cpp
│ │ ├── d3d12_staging_buffer.cpp
│ │ ├── d3d12_state_object.cpp
│ │ ├── d3d12_structs.hpp
│ │ ├── d3d12_structured_buffer.cpp
│ │ ├── d3d12_structured_buffer_pool.cpp
│ │ ├── d3d12_structured_buffer_pool.hpp
│ │ ├── d3d12_texture_resources.hpp
│ │ ├── d3d12_textures.cpp
│ │ ├── d3d12_viewport.cpp
│ │ └── d3dx12.hpp
│ ├── engine_registry.cpp
│ ├── engine_registry.hpp
│ ├── entry.hpp
│ ├── frame_graph/
│ │ └── frame_graph.hpp
│ ├── id_factory.cpp
│ ├── id_factory.hpp
│ ├── imgui/
│ │ ├── ImGuizmo.cpp
│ │ ├── ImGuizmo.h
│ │ ├── imconfig.hpp
│ │ ├── imgui.cpp
│ │ ├── imgui.hpp
│ │ ├── imgui_draw.cpp
│ │ ├── imgui_impl_dx12.cpp
│ │ ├── imgui_impl_dx12.hpp
│ │ ├── imgui_impl_win32.cpp
│ │ ├── imgui_impl_win32.hpp
│ │ ├── imgui_internal.hpp
│ │ ├── imgui_widgets.cpp
│ │ ├── imstb_rectpack.hpp
│ │ ├── imstb_textedit.hpp
│ │ └── imstb_truetype.hpp
│ ├── imgui_graphics_settings.hpp
│ ├── imgui_tools.cpp
│ ├── imgui_tools.hpp
│ ├── material_pool.cpp
│ ├── material_pool.hpp
│ ├── model_loader.cpp
│ ├── model_loader.hpp
│ ├── model_loader_assimp.cpp
│ ├── model_loader_assimp.hpp
│ ├── model_loader_tinygltf.cpp
│ ├── model_loader_tinygltf.hpp
│ ├── model_pool.cpp
│ ├── model_pool.hpp
│ ├── pipeline_registry.cpp
│ ├── pipeline_registry.hpp
│ ├── platform_independend_structs.hpp
│ ├── registry.hpp
│ ├── render_tasks/
│ │ ├── d3d12_accumulation.hpp
│ │ ├── d3d12_ansel.hpp
│ │ ├── d3d12_bloom_composition.hpp
│ │ ├── d3d12_bloom_extract_bright.hpp
│ │ ├── d3d12_bloom_horizontal_blur.hpp
│ │ ├── d3d12_bloom_vertical_blur.hpp
│ │ ├── d3d12_brdf_lut_precalculation.hpp
│ │ ├── d3d12_build_acceleration_structures.hpp
│ │ ├── d3d12_cubemap_convolution.hpp
│ │ ├── d3d12_deferred_composition.cpp
│ │ ├── d3d12_deferred_composition.hpp
│ │ ├── d3d12_deferred_main.hpp
│ │ ├── d3d12_deferred_render_target_copy.hpp
│ │ ├── d3d12_dof_bokeh.hpp
│ │ ├── d3d12_dof_bokeh_postfilter.hpp
│ │ ├── d3d12_dof_coc.hpp
│ │ ├── d3d12_dof_composition.hpp
│ │ ├── d3d12_dof_compute_near_mask.hpp
│ │ ├── d3d12_dof_dilate_flatten.hpp
│ │ ├── d3d12_dof_dilate_flatten_second_pass.hpp
│ │ ├── d3d12_dof_dilate_near.hpp
│ │ ├── d3d12_down_scale.hpp
│ │ ├── d3d12_equirect_to_cubemap.hpp
│ │ ├── d3d12_hbao.hpp
│ │ ├── d3d12_imgui_render_task.hpp
│ │ ├── d3d12_path_tracer.hpp
│ │ ├── d3d12_post_processing.hpp
│ │ ├── d3d12_raytracing_task.hpp
│ │ ├── d3d12_reflection_denoiser.hpp
│ │ ├── d3d12_rt_hybrid_helpers.hpp
│ │ ├── d3d12_rt_reflection_task.hpp
│ │ ├── d3d12_rt_shadow_task.hpp
│ │ ├── d3d12_rtao_task.hpp
│ │ ├── d3d12_shadow_denoiser_task.hpp
│ │ └── d3d12_spatial_reconstruction.hpp
│ ├── renderer.cpp
│ ├── renderer.hpp
│ ├── resource_pool_texture.cpp
│ ├── resource_pool_texture.hpp
│ ├── root_signature_registry.cpp
│ ├── root_signature_registry.hpp
│ ├── rt_pipeline_registry.cpp
│ ├── rt_pipeline_registry.hpp
│ ├── scene_graph/
│ │ ├── camera_node.cpp
│ │ ├── camera_node.hpp
│ │ ├── light_node.cpp
│ │ ├── light_node.hpp
│ │ ├── mesh_node.cpp
│ │ ├── mesh_node.hpp
│ │ ├── node.cpp
│ │ ├── node.hpp
│ │ ├── scene_graph.cpp
│ │ ├── scene_graph.hpp
│ │ ├── skybox_node.cpp
│ │ └── skybox_node.hpp
│ ├── settings.hpp
│ ├── shader_registry.cpp
│ ├── shader_registry.hpp
│ ├── structs.hpp
│ ├── structured_buffer_pool.cpp
│ ├── structured_buffer_pool.hpp
│ ├── util/
│ │ ├── aabb.cpp
│ │ ├── aabb.hpp
│ │ ├── bitmap_allocator.hpp
│ │ ├── defines.hpp
│ │ ├── delegate.hpp
│ │ ├── file_watcher.cpp
│ │ ├── file_watcher.hpp
│ │ ├── log.cpp
│ │ ├── log.hpp
│ │ ├── logfile_handler.cpp
│ │ ├── logfile_handler.hpp
│ │ ├── named_type.hpp
│ │ ├── pair_hash.hpp
│ │ ├── strings.hpp
│ │ ├── thread_pool.hpp
│ │ └── user_literals.hpp
│ ├── version.hpp
│ ├── vertex.hpp
│ ├── window.cpp
│ ├── window.hpp
│ ├── wisp.hpp
│ └── wisprenderer_export.hpp
├── tests/
│ ├── CMakeLists.txt
│ ├── common/
│ │ ├── scene.cpp
│ │ └── scene.hpp
│ ├── demo/
│ │ ├── debug_camera.hpp
│ │ ├── demo.cpp
│ │ ├── demo_frame_graphs.hpp
│ │ ├── engine_interface.hpp
│ │ ├── physics_engine.cpp
│ │ ├── physics_engine.hpp
│ │ ├── physics_node.cpp
│ │ ├── physics_node.hpp
│ │ ├── scene_alien.cpp
│ │ ├── scene_alien.hpp
│ │ ├── scene_emibl.cpp
│ │ ├── scene_emibl.hpp
│ │ ├── scene_sponza.cpp
│ │ ├── scene_sponza.hpp
│ │ ├── scene_viknell.cpp
│ │ ├── scene_viknell.hpp
│ │ ├── spline_library/
│ │ │ ├── LICENSE
│ │ │ ├── spline.h
│ │ │ ├── splines/
│ │ │ │ ├── cubic_hermite_spline.h
│ │ │ │ ├── generic_b_spline.h
│ │ │ │ ├── natural_spline.h
│ │ │ │ ├── quintic_hermite_spline.h
│ │ │ │ ├── uniform_cr_spline.h
│ │ │ │ └── uniform_cubic_bspline.h
│ │ │ ├── utils/
│ │ │ │ ├── arclength.h
│ │ │ │ ├── calculus.h
│ │ │ │ ├── linearalgebra.h
│ │ │ │ ├── nanoflann.hpp
│ │ │ │ ├── spline_common.h
│ │ │ │ ├── splineinverter.h
│ │ │ │ └── splinesample_adaptor.h
│ │ │ └── vector.h
│ │ ├── spline_node.cpp
│ │ └── spline_node.hpp
│ └── graphics_benchmark/
│ ├── frame_graphs.cpp
│ ├── frame_graphs.hpp
│ ├── graphics_benchmark.cpp
│ ├── spheres_scene.cpp
│ └── spheres_scene.hpp
└── wisp.version
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behaviour:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behaviour**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]
- Hardware [e.g. CPU:6700k, GPU:RTX 2080ti, RAM:1GB]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/design-change.md
================================================
---
name: Design change
about: Suggest a design change for the project
title: ''
labels: design change
assignees: ''
---
**Is your design request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or designs you've considered.
**Additional context**
Add any other context or screenshots about the request here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/ISSUE_TEMPLATE/re-factor-request.md
================================================
---
name: Re-factor request
about: Suggest a re-factor of code for the project
title: ''
labels: code change
assignees: ''
---
**Is your request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions you've considered.
**Additional context**
Add any other context or screenshots about the request here.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
================================================
**Description**
Give a clear description of the changes
**Issues**
reference related issues if any
**Possible conflicts**
list any possible conflicts
================================================
FILE: .gitignore
================================================
/build/
/build_vs2017_arm/
/build_vs2017_win64/
/build_vs2019_win64/
/build_vs2019_win32/
/build_vs2017_win32/
*.swp
*.swo
/cmake-build-debug/
/.idea/
perf_framerate.txt
*.dll
*.lib
/resources/models
/resources/materials
/deps/ansel/
/deps/hbao+/
/benchmark_images/
/CrashPadDB/
/logs/
================================================
FILE: .gitmodules
================================================
[submodule "deps/fmt"]
path = deps/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "deps/DirectXTex"]
path = deps/DirectXTex
url = https://github.com/TeamWisp/DirectXTex.git
branch = master
[submodule "deps/assimp"]
path = deps/assimp
url = https://github.com/assimp/assimp
[submodule "deps/fallback"]
path = deps/fallback
url = https://github.com/TeamWisp/DXR-Fallback-Layer.git
[submodule "deps/Wisp-LFS"]
path = deps/Wisp-LFS
url = https://github.com/TeamWisp/Wisp-LFS.git
[submodule "deps/crashpad"]
path = deps/crashpad
url = https://github.com/TeamWisp/Crashpad.git
[submodule "deps/tinygltf"]
path = deps/tinygltf
url = https://github.com/syoyo/tinygltf
[submodule "deps/bullet3"]
path = deps/bullet3
url = https://github.com/TeamWisp/bullet3
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.13)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
add_compile_definitions(_ENABLE_EXTENDED_ALIGNED_STORAGE )
project(Wisp)
option(WISP_BUILD_TESTS "Enable Wisp Tests" ON)
option(WISP_LOG_TO_STDOUT "Allow printing to stdout" ON)
option(WISP_BUILD_SHARED "Build Wisp as a shared library" OFF)
if (WISP_BUILD_SHARED)
set(BUILD_SHARED_LIBS ON)
message(STATUS "Building wisp as a SHARED library")
else()
add_definitions(-DWISPRENDERER_STATIC_DEFINE)
message(STATUS "Building wisp as a STATIC library")
set(BUILD_SHARED_LIBS OFF)
endif()
if (WISP_LOG_TO_STDOUT)
message(STATUS "Wisp Renderer is allowed to print to stdout")
add_definitions(-DWISPRENDERER_LOG_TO_STDOUT)
endif()
#Detect whether we have HBAO+ SDK available.
if(EXISTS ${CMAKE_SOURCE_DIR}/deps/hbao+)
message(STATUS "Found NVIDIA Gameworks HBAO+")
set(NVIDIA_GAMEWORKS_HBAO_LIB ${CMAKE_SOURCE_DIR}/GFSDK_SSAO_D3D12.win64.lib)
add_definitions(-DNVIDIA_GAMEWORKS_HBAO)
configure_file(${CMAKE_SOURCE_DIR}/deps/hbao+/lib/GFSDK_SSAO_D3D12.win64.dll ${CMAKE_SOURCE_DIR} COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/deps/hbao+/lib/GFSDK_SSAO_D3D12.win64.lib ${CMAKE_SOURCE_DIR} COPYONLY)
else()
message(STATUS "Failed to find NVIDIA Gameworks HBAO+")
endif()
#Detect whether we have the AnselSDK available.
if(EXISTS ${CMAKE_SOURCE_DIR}/deps/ansel)
message(STATUS "Found NVIDIA Gameworks Ansel")
set(NVIDIA_GAMEWORKS_ANSEL_LIB ${CMAKE_SOURCE_DIR}/AnselSDK64.lib)
add_definitions(-DNVIDIA_GAMEWORKS_ANSEL)
configure_file(${CMAKE_SOURCE_DIR}/deps/ansel/lib/AnselSDK64.lib ${CMAKE_SOURCE_DIR} COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/deps/ansel/redist/AnselSDK64.dll ${CMAKE_SOURCE_DIR} COPYONLY)
else()
message(STATUS "Failed to find NVIDIA Gameworks Ansel")
endif()
##### OUTPUT DIRECTORIES #####
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
configure_file(${CMAKE_SOURCE_DIR}/deps/fallback/Bin/dxrfallbackcompiler.dll ${CMAKE_SOURCE_DIR} COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/deps/fallback/Bin/dxil.dll ${CMAKE_SOURCE_DIR} COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/deps/fallback/Bin/dxcompiler.dll ${CMAKE_SOURCE_DIR} COPYONLY)
##### SOURCES #####
file(GLOB HEADERS CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp")
file(GLOB SOURCES CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
file(GLOB FG_HEADERS CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/frame_graph/*.hpp")
file(GLOB FG_SOURCES CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/frame_graph/*.cpp")
file(GLOB SG_HEADERS CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/scene_graph/*.hpp")
file(GLOB SG_SOURCES CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/scene_graph/*.cpp")
file(GLOB RT_HEADERS CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/render_tasks/*.hpp")
file(GLOB RT_SOURCES CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/render_tasks/*.cpp")
file(GLOB D3D12_HEADERS CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/d3d12/*.hpp")
file(GLOB D3D12_SOURCES CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/d3d12/*.cpp")
file(GLOB UTIL_HEADERS CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/util/*.hpp")
file(GLOB UTIL_SOURCES CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/util/*.cpp")
file(GLOB IMGUI_HEADERS CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/*.hpp")
file(GLOB IMGUI_SOURCES CONFIGURE_DEPENDS] "${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/*.cpp")
source_group("High Level API" FILES ${SOURCES} ${HEADERS})
source_group("Frame Graph" FILES ${FG_SOURCES} ${FG_HEADERS})
source_group("Scene Graph" FILES ${SG_SOURCES} ${SG_HEADERS})
source_group("Render Tasks" FILES ${RT_SOURCES} ${RT_HEADERS})
source_group("D3D12" FILES ${D3D12_SOURCES} ${D3D12_HEADERS})
source_group("Utility" FILES ${UTIL_SOURCES} ${UTIL_HEADERS})
source_group("ImGui" FILES ${IMGUI_SOURCES} ${IMGUI_HEADERS})
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
# Bullet Options
set(BUILD_CPU_DEMOSON OFF CACHE BOOL "" FORCE)
set(USE_GRAPHICAL_BENCHMARKON OFF CACHE BOOL "" FORCE)
set(BUILD_ENETON OFF CACHE BOOL "" FORCE)
set(BUILD_CLSOCKETON OFF CACHE BOOL "" FORCE)
set(BUILD_BULLET2_DEMOSON OFF CACHE BOOL "" FORCE)
set(BUILD_EXTRASON OFF CACHE BOOL "" FORCE)
set(BUILD_UNIT_TESTSON OFF CACHE BOOL "" FORCE)
set(USE_GRAPHICAL_BENCHMARKON OFF CACHE BOOL "" FORCE)
set(BUILD_STATIC_LIBON ON CACHE BOOL "" FORCE)
set(NO_EXPORTON ON CACHE BOOL "" FORCE)
## dependencies ##
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/fmt ${CMAKE_BINARY_DIR}/fmt)
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/DirectXTex ${CMAKE_BINARY_DIR}/DirectXTex)
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/fallback ${CMAKE_BINARY_DIR}/fallback)
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/bullet3 ${CMAKE_BINARY_DIR}/bullet3)
set(ASSIMP_BUILD_SHARED_LIBS OFF)
set(ASSIMP_NO_EXPORT ON CACHE BOOL "" FORCE)
set(ASSIMP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT OFF)
set(ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT OFF)
#IMPORTERS
set( ASSIMP_BUILD_AMF_IMPORTER OFF )
set( ASSIMP_BUILD_3DS_IMPORTER OFF )
set( ASSIMP_BUILD_AC_IMPORTER OFF )
set( ASSIMP_BUILD_ASE_IMPORTER OFF )
set( ASSIMP_BUILD_ASSBIN_IMPORTER OFF )
set( ASSIMP_BUILD_ASSXML_IMPORTER OFF )
set( ASSIMP_BUILD_B3D_IMPORTER OFF )
set( ASSIMP_BUILD_BVH_IMPORTER OFF )
set( ASSIMP_BUILD_COLLADA_IMPORTER OFF )
set( ASSIMP_BUILD_DXF_IMPORTER OFF )
set( ASSIMP_BUILD_CSM_IMPORTER OFF )
set( ASSIMP_BUILD_HMP_IMPORTER OFF )
set( ASSIMP_BUILD_IRRMESH_IMPORTER OFF )
set( ASSIMP_BUILD_IRR_IMPORTER OFF )
set( ASSIMP_BUILD_LWO_IMPORTER OFF )
set( ASSIMP_BUILD_LWS_IMPORTER OFF )
set( ASSIMP_BUILD_MD2_IMPORTER OFF )
set( ASSIMP_BUILD_MD3_IMPORTER OFF )
set( ASSIMP_BUILD_MD5_IMPORTER OFF )
set( ASSIMP_BUILD_MDC_IMPORTER OFF )
set( ASSIMP_BUILD_MDL_IMPORTER OFF )
set( ASSIMP_BUILD_NFF_IMPORTER OFF )
set( ASSIMP_BUILD_NDO_IMPORTER OFF )
set( ASSIMP_BUILD_OFF_IMPORTER OFF )
set( ASSIMMP_BUILD_OBJ_IMPORTER ON ) #ON
set( ASSIMP_BUILD_OGRE_IMPORTER OFF )
set( ASSIMP_BUILD_OPENGEX_IMPORTER OFF )
set( ASSIMP_BUILD_PLY_IMPORTER OFF )
set( ASSIMP_BUILD_MS3D_IMPORTER OFF )
set( ASSIMP_BUILD_COB_IMPORTER OFF )
set( ASSIMP_BUILD_BLEND_IMPORTER OFF )
set( ASSIMP_BUILD_IFC_IMPORTER OFF )
set( ASSIMP_BUILD_XGL_IMPORTER OFF )
set( ASSIMMP_BUILD_FBX_IMPORTER ON ) #ON
set( ASSIMP_BUILD_Q3D_IMPORTER OFF )
set( ASSIMP_BUILD_Q3BSP_IMPORTER OFF )
set( ASSIMP_BUILD_RAW_IMPORTER ON ) #ON
set( ASSIMP_BUILD_SIB_IMPORTER ON ) #ON
set( ASSIMP_BUILD_SMD_IMPORTER ON ) #ON
set( ASSIMP_BUILD_STL_IMPORTER OFF )
set( ASSIMP_BUILD_TERRAGEN_IMPORTER OFF )
set( ASSIMP_BUILD_3D_IMPORTER OFF )
set( ASSIMP_BUILD_X_IMPORTER OFF )
set( ASSIMP_BUILD_X3D_IMPORTER OFF )
set( ASSIMP_BUILD_GLTF_IMPORTER ON ) #ON
set( ASSIMP_BUILD_3MF_IMPORTER OFF )
set( ASSIMP_BUILD_MMD_IMPORTER OFF )
# END IMPORTERS
#set(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT CACHE INTERNAL FALSE)
#set(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT OFF)
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/assimp ${CMAKE_BINARY_DIR}/assimp)
## dependencies options ##
set(FMT_TEST OFF)
set(FMT_DOC OFF)
set(FMT_PEDANTIC OFF)
set(FMT_WERROR OFF)
## dependencies sorting ##
set_target_properties (fmt PROPERTIES FOLDER ThirdParty)
set_target_properties (DirectXTex PROPERTIES FOLDER ThirdParty)
if (MSVC)
target_compile_options(fmt PRIVATE /W0)
target_compile_options(DirectXTex PRIVATE /W0)
endif()
set_target_properties(Bullet3Common PROPERTIES FOLDER "ThirdParty/Bullet")
set_target_properties(BulletCollision PROPERTIES FOLDER "ThirdParty/Bullet")
set_target_properties(BulletDynamics PROPERTIES FOLDER "ThirdParty/Bullet")
set_target_properties(BulletInverseDynamics PROPERTIES FOLDER "ThirdParty/Bullet")
set_target_properties(BulletSoftBody PROPERTIES FOLDER "ThirdParty/Bullet")
set_target_properties(LinearMath PROPERTIES FOLDER "ThirdParty/Bullet")
set_target_properties(assimp PROPERTIES FOLDER ThirdParty)
set_target_properties(assimp_cmd PROPERTIES FOLDER ThirdParty)
set_target_properties(IrrXML PROPERTIES FOLDER ThirdParty)
set_target_properties(UpdateAssimpLibsDebugSymbolsAndDLLs PROPERTIES FOLDER ThirdParty)
set_target_properties(zlib PROPERTIES FOLDER ThirdParty)
set_target_properties(zlibstatic PROPERTIES FOLDER ThirdParty)
#set_target_properties(unit PROPERTIES FOLDER ThirdParty)
set_target_properties(uninstall PROPERTIES FOLDER ThirdParty)
if(WISP_BUILD_SHARED)
set(WISP_LIB_TYPE SHARED)
else()
set(WISP_LIB_TYPE STATIC)
endif()
add_library(WispRenderer ${WISP_LIB_TYPE} ${HEADERS} ${SOURCES} ${IMGUI_HEADERS} ${IMGUI_SOURCES} ${UTIL_HEADERS} ${UTIL_SOURCES} ${RT_HEADERS} ${RT_SOURCES} ${FG_HEADERS} ${FG_SOURCES} ${SG_HEADERS} ${SG_SOURCES} ${D3D12_SOURCES} ${D3D12_HEADERS})
set_target_properties(WispRenderer PROPERTIES CXX_STANDARD 20)
set_target_properties(WispRenderer PROPERTIES CXX_EXTENSIONS OFF)
set_target_properties(WispRenderer PROPERTIES CMAKE_CXX_STANDARD_REQUIRED ON)
if (MSVC)
target_compile_options(WispRenderer PRIVATE /W4 /permissive- /MP /Gm-)
endif()
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/DirectXTex/DirectXTex/)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/fmt/include)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/tinygltf)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/assimp/include)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/fallback/Include)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/hbao+/include)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/ansel/include)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/crashpad)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/crashpad/third_party/mini_chromium/mini_chromium)
target_include_directories(WispRenderer PUBLIC ${CMAKE_SOURCE_DIR}/deps/bullet3/src)
link_directories(${CMAKE_SOURCE_DIR}/deps/crashpad/out/$(ConfigurationName)/obj/ ${CMAKE_SOURCE_DIR}/deps/crashpad/out/$(ConfigurationName)/obj/client/ ${CMAKE_SOURCE_DIR}/deps/crashpad/out/$(ConfigurationName)/obj/util/ ${CMAKE_SOURCE_DIR}/deps/crashpad/out/$(ConfigurationName)/obj/third_party/mini_chromium/mini_chromium/base/)
target_link_libraries(WispRenderer DXRFallback dxguid.lib d3d12.lib dxgi.lib d3dcompiler.lib dxcompiler DirectXTex fmt assimp ${NVIDIA_GAMEWORKS_HBAO_LIB} ${NVIDIA_GAMEWORKS_ANSEL_LIB} crashpad_client crashpad_util base)
set_target_properties(WispRenderer PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/../")
if (WISP_BUILD_TESTS)
add_subdirectory(tests ${CMAKE_BINARY_DIR}/tests)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Demo)
endif()
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at viktorzoutman@vzout.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
================================================
FILE: Jenkinsfile
================================================
pipeline {
agent any
stages {
stage('Install'){
steps{
echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}"
bat '''cd "%WORKSPACE%\\Scripts"
call JenkinsWebhook.bat ":bulb: Building: %JOB_NAME%. Jenkins build nr: %BUILD_NUMBER%"
cd "%WORKSPACE%
install -remote "%WORKSPACE%"
if errorlevel 1 (
cd "%WORKSPACE%\\Scripts"
JenkinsWebhook ":x: %JOB_NAME% Build Failed!! Jenskins build nr: %BUILD_NUMBER% - install failed"
EXIT 1
)'''
}
}
stage('Build') {
steps {
/*bat '''
cd "%WORKSPACE%"
cmake --build ./build_vs2017_win32
if errorlevel 1 (
cd "%WORKSPACE%\\Scripts"
JenkinsWebhook ":x: %JOB_NAME% Build Failed!! Jenskins build nr: %BUILD_NUMBER% - 32bit build failed"
EXIT 1
)
'''*/
bat'''
cd "%WORKSPACE%"
cmake --build ./build_vs2017_win64
if errorlevel 1 (
cd "%WORKSPACE%\\Scripts"
JenkinsWebhook ":x: %JOB_NAME% Build Failed!! Jenskins build nr: %BUILD_NUMBER% - 64bit-debug build failed"
EXIT 1
)
'''
bat'''
cd "%WORKSPACE%"
cmake --build ./build_vs2017_win64 --config Release
if errorlevel 1 (
cd "%WORKSPACE%\\Scripts"
JenkinsWebhook ":x: %JOB_NAME% Build Failed!! Jenskins build nr: %BUILD_NUMBER% - 64bit-release build failed"
EXIT 1
)
'''
}
}
stage('test'){
steps{
script{
def has_failed = false
try{
bat'''
cd "%WORKSPACE%"
cd build_vs2017_win64/bin/debug
WispTest.exe
if errorlevel 1 (
EXIT 1
)
'''
}
catch( exc ){
has_failed = true
bat'''
cd "%WORKSPACE%\\Scripts"
JenkinsWebhook ":x: %JOB_NAME% Build Failed!! Jenskins build nr: %BUILD_NUMBER% - 64bit-debug Tests failed"
'''
}
try{
bat'''
cd "%WORKSPACE%"
cd build_vs2017_win64/bin/release
WispTest.exe
if errorlevel 1 (
EXIT 1
)
'''
}
catch( exc ){
has_failed = true
bat'''
cd "%WORKSPACE%\\Scripts"
JenkinsWebhook ":x: %JOB_NAME% Build Failed!! Jenskins build nr: %BUILD_NUMBER% - 64bit-release Tests failed"
'''
}
if(has_failed){
EXIT 1
}
}
}
}
stage('finalize'){
steps{
bat '''
rem mkdir builds
rem move ./RayTracingLib/Debug "./builds/build_%BUILD_NUMBER%"
cd "%WORKSPACE%\\scripts
call "JenkinsWebhook.bat" ":white_check_mark: %JOB_NAME% Build Succesfull!! Jenkins build nr: %BUILD_NUMBER%"
'''
}
}
}
}
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
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.
================================================
FILE: README.md
================================================
# [<img src="http://upload.vzout.com/wisp/logo.png" width="40"> WispRenderer](https://teamwisp.github.io) - Real-Time Raytracing Renderer
[](https://github.com/TeamWisp/WispRenderer/releases)
[](https://github.com/TeamWisp/WispRenderer/issues)
[](https://opensource.org/licenses/EPL-2.0)
[](https://discord.gg/Q3vDfqR)
[](https://twitter.com/wisprenderer)

## [What is it?](https://teamwisp.github.io/product/)
Wisp is a general purpose high level rendering library. Specially made for real time raytracing with NVIDIA RTX graphics cards. Made by a group of students from [Breda University of Applied Sciences](https://www.buas.nl/) specializing in graphics programming.
**Features**
* Physically Based Rendering
* Ray Traced Global Illumination
* Path Traced Global Illumination
* Ray Traced Ambient Occlusion
* Ray Traced Reflections
* Ray Traced Shadows
* Translucency & Transparency.
* NVIDIA's HBAO+
* NVIDIA's AnselSDK
**Supported Rendering Backends**
* DirectX 12
**Supported Platforms**
* Windows 10 (Version 1903)
**Supported Compilers**
* Visual Studio 2017
* Visual Studio 2019
## [Installation](https://teamwisp.github.io/workspace_setup/)
### Installer
```
git clone https://github.com/TeamWisp/WispRenderer.git
```
Then run `installer.exe` located in the new `WispRenderer` folder and follow the on-screen prompts. When finished you can find the `.sln` file in the `build_vs2019_win64` folder.
### Manual
```
git clone https://github.com/TeamWisp/WispRenderer.git
cd WispRenderer
mkdir build
cd build
cmake -G "Visual Studio 16 2019" ..
```
Now you can run the `.sln` file inside the `build` folder. Want to use NVIDIA Gameworks? See the [advanced documation](https://teamwisp.github.io/workspace_setup/).
# [Documentation](https://teamwisp.github.io/)
# [Example](https://github.com/TeamWisp/WispRenderer/tree/master/demo)
# [Getting Involved](https://teamwisp.github.io/)
Want to help us out? That's definatly possible! Check out our [contribution page](https://teamwisp.github.io/) on how.
# [Development Blog](https://teamwisp.github.io/WispBlog/)
# [Discord](https://discord.gg/Q3vDfqR)
Need help, want to get updates as soon as they happen or just want a chat? Join our [Discord Server](https://discord.gg/Q3vDfqR)!
## Trailer
<a href="http://www.youtube.com/watch?feature=player_embedded&v=cOxVArIFmEg"
target="_blank"><img src="http://img.youtube.com/vi/cOxVArIFmEg/0.jpg" border="0" /></a>
## Media
<img src="http://upload.vzout.com/wisp/sponza.png" width="300"> <img src="http://upload.vzout.com/wisp/sun_temple.jpg" width="300">
## [License (Eclipse Public License version 2.0)](https://opensource.org/licenses/EPL-2.0)
<a href="https://opensource.org/licenses/EPL-2.0" target="_blank">
<img align="right" src="http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png">
</a>
```
Copyright 2018-2019 Breda University of Applied Sciences
If a Contributor Distributes the Program in any form, then:
a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and
b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:
i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and
iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.
When the Program is Distributed as Source Code:
a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (‘notices’) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.
```
================================================
FILE: imgui.ini
================================================
[Window][DockspaceViewport_11111111]
Pos=0,21
Size=1280,699
Collapsed=0
[Window][Debug##Default]
Pos=1022,401
Size=228,150
Collapsed=1
[Window][Theme]
Pos=1032,376
Size=248,201
Collapsed=0
DockId=0x00000009,0
[Window][ImGui Details]
Pos=1032,607
Size=248,113
Collapsed=0
[Window][Camera Settings]
Pos=0,342
Size=270,378
Collapsed=0
DockId=0x00000008,0
[Window][Light Editor]
Pos=0,21
Size=32,32
Collapsed=0
[Window][Shader Registry]
Pos=340,105
Size=590,455
Collapsed=0
[Window][Pipeline Registry]
Pos=317,134
Size=312,443
Collapsed=0
[Window][Root Signature Registry]
Pos=748,338
Size=169,259
Collapsed=0
[Window][DirectX 12 Settings]
Pos=1032,376
Size=248,201
Collapsed=0
DockId=0x00000009,2
[Window][Hardware Info]
Pos=1032,376
Size=248,201
Collapsed=0
DockId=0x00000009,1
[Window][Model Editor]
Pos=0,31
Size=32,32
Collapsed=0
[Window][Light Details]
Pos=0,403
Size=220,129
Collapsed=0
[Window][Inspect]
Pos=26,21
Size=32,32
Collapsed=0
[Window][Viewport]
Pos=272,21
Size=758,699
Collapsed=0
DockId=0x00000002,0
[Window][Scene Graph Editor]
Pos=0,21
Size=270,319
Collapsed=0
DockId=0x00000007,1
[Window][Inspector]
Pos=1032,21
Size=248,353
Collapsed=0
DockId=0x00000006,0
[Window][DockSpaceViewport_11111111]
Pos=0,21
Size=1280,699
Collapsed=0
[Window][Stats]
Pos=280,121
Size=205,85
Collapsed=0
[Window][Test popup]
ViewportPos=1503,395
ViewportId=0xB4FE7E97
Size=151,177
Collapsed=0
[Window][Emissive Multiplier]
Pos=944,589
Size=303,134
Collapsed=0
[Window][RTAO Settings]
Pos=1032,579
Size=248,141
Collapsed=0
DockId=0x0000000A,0
[Window][HBAO+ Settings]
Pos=1032,579
Size=248,141
Collapsed=0
DockId=0x0000000A,0
[Window][NVIDIA Ansel Settings]
Pos=1032,376
Size=248,201
Collapsed=0
DockId=0x00000009,3
[Window][Acceleration Structure Settings]
Pos=1032,579
Size=248,141
Collapsed=0
DockId=0x0000000A,1
[Window][Shadow Settings]
Pos=1032,579
Size=248,141
Collapsed=0
DockId=0x0000000A,2
[Window][Demo Scene]
Pos=0,21
Size=270,319
Collapsed=0
DockId=0x00000007,0
[Docking][Data]
DockSpace ID=0x8B93E3BD Pos=0,21 Size=1280,699 Split=X
DockNode ID=0x00000003 Parent=0x8B93E3BD SizeRef=1030,699 Split=X
DockNode ID=0x00000001 Parent=0x00000003 SizeRef=270,699 Split=Y SelectedTab=0xF4865B00
DockNode ID=0x00000007 Parent=0x00000001 SizeRef=219,319 SelectedTab=0xF4865B00
DockNode ID=0x00000008 Parent=0x00000001 SizeRef=219,378 SelectedTab=0x8722C6A1
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=758,699 CentralNode=1 SelectedTab=0x995B0CF8
DockNode ID=0x00000004 Parent=0x8B93E3BD SizeRef=248,699 Split=Y SelectedTab=0x070A839D
DockNode ID=0x00000006 Parent=0x00000004 SizeRef=248,353 SelectedTab=0xF02CD328
DockNode ID=0x00000005 Parent=0x00000004 SizeRef=248,344 Split=Y SelectedTab=0xDA48A090
DockNode ID=0x00000009 Parent=0x00000005 SizeRef=248,201 SelectedTab=0x4BB5AED3
DockNode ID=0x0000000A Parent=0x00000005 SizeRef=248,141 SelectedTab=0xDCA1C528
================================================
FILE: resources/alien_lights.json
================================================
{
"lights": [
{
"angle": 69.0,
"color": [
0.0,
7.843137264251709,
11.764705657958984
],
"pos": [
0.5994455218315125,
1.0072081089019775,
0.7158395648002625,
0.0
],
"radius": 200.0,
"rot": [
-0.1899939924478531,
0.02998405694961548,
0.0,
0.0
],
"size": 0.0872664600610733,
"type": 0
},
{
"angle": 0.6981316804885864,
"color": [
1.0,
0.9999899864196777,
0.9999899864196777
],
"pos": [
0.8884486556053162,
1.0663642883300781,
0.0,
0.0
],
"radius": 0.0,
"rot": [
0.0,
0.0,
0.0,
0.0
],
"size": 0.0,
"type": 0
}
]
}
================================================
FILE: resources/shaders/deferred_composition_pass.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DEFERRED_COMPOSITION_PASS_HLSL__
#define __DEFERRED_COMPOSITION_PASS_HLSL__
#define LIGHTS_REGISTER register(t4)
#define MAX_REFLECTION_LOD 6
#include "fullscreen_quad.hlsl"
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
#include "lighting.hlsl"
Texture2D gbuffer_albedo_roughness : register(t0);
Texture2D gbuffer_normal_metallic : register(t1);
Texture2D gbuffer_emissive_ao : register(t2);
Texture2D gbuffer_depth : register(t3);
//Consider SRV for light buffer in register t4
TextureCube skybox : register(t5);
TextureCube irradiance_map : register(t6);
TextureCube pref_env_map : register(t7);
Texture2D brdf_lut : register(t8);
Texture2D buffer_reflection : register(t9); //rgb: reflection, a : 1 / pdf
Texture2D buffer_shadow : register(t10); //r: shadow factor
Texture2D screen_space_irradiance : register(t11);
Texture2D screen_space_ao : register(t12);
RWTexture2D<float4> output : register(u0);
SamplerState point_sampler : register(s0);
SamplerState linear_sampler : register(s1);
cbuffer CameraProperties : register(b0)
{
float4x4 view;
float4x4 projection;
float4x4 inv_projection;
float4x4 inv_view;
float4x4 prev_projection;
float4x4 prev_view;
uint is_hybrid;
uint is_path_tracer;
uint is_ao;
uint has_shadows;
float3 padding1;
uint has_reflections;
};
static uint min_depth = 0xFFFFFFFF;
static uint max_depth = 0x0;
float3 unpack_position(float2 uv, float depth, float4x4 proj_inv, float4x4 view_inv) {
const float4 ndc = float4(uv * 2.0f - 1.f, depth, 1.0f);
const float4 pos = mul( view_inv, mul(proj_inv, ndc));
return (pos / pos.w).xyz;
}
[numthreads(16, 16, 1)]
void main_cs(int3 dispatch_thread_id : SV_DispatchThreadID)
{
float2 screen_size = float2(0.f, 0.f);
output.GetDimensions(screen_size.x, screen_size.y);
// added offset of 0.5f to select proper pixel to sample from.
// screen coords always get floored, therefore if the coords would be (1.9, 1.0),
// it would sample (1.0, 1.0) instead of the intended (2.0, 1.0). Adding the offset solves this problem.
float2 screen_coord = int2(dispatch_thread_id.x, dispatch_thread_id.y) + 0.5f;
float2 uv = screen_coord / screen_size;
const float depth_f = gbuffer_depth.SampleLevel(point_sampler, uv, 0.0f).r;
// View position and camera position
float3 pos = unpack_position(float2(uv.x, 1.f - uv.y), depth_f, inv_projection, inv_view);
float3 camera_pos = float3(inv_view[0][3], inv_view[1][3], inv_view[2][3]);
float3 V = normalize(camera_pos - pos);
float3 retval;
if(depth_f != 1.0f)
{
// GBuffer contents
float4 albedo_roughness = gbuffer_albedo_roughness.SampleLevel(point_sampler, uv, 0.0f);
float3 albedo = albedo_roughness.xyz;
const float roughness = albedo_roughness.w;
float4 normal_metallic = gbuffer_normal_metallic.SampleLevel(point_sampler, uv, 0.0f);
float3 normal = normalize(normal_metallic.xyz);
const float metallic = normal_metallic.w;
float4 emissive_ao = gbuffer_emissive_ao.SampleLevel(point_sampler, uv, 0.0f);
float3 emissive = emissive_ao.xyz;
float gbuffer_ao = emissive_ao.w;
float3 flipped_N = normal;
flipped_N.y *= -1.0f;
const float2 sampled_brdf = brdf_lut.SampleLevel(point_sampler, float2(max(dot(normal, V), 0.01f), roughness), 0).rg;
float3 sampled_environment_map = pref_env_map.SampleLevel(linear_sampler, reflect(-V, normal), roughness * MAX_REFLECTION_LOD);
// Get irradiance
float3 irradiance = lerp(
irradiance_map.SampleLevel(linear_sampler, flipped_N, 0.0f).xyz,
screen_space_irradiance.SampleLevel(point_sampler, uv, 0.0f).xyz,
is_path_tracer);
// Get ao
float ao = lerp(
1,
screen_space_ao.SampleLevel(point_sampler, uv, 0.0f).xyz,
// Lerp factor (0: env map, 1: path traced)
is_ao);
//Ao is multiplied with material texture ao, if present
ao *= gbuffer_ao;
// Get shadow factor (0: fully shadowed, 1: no shadow)
float3 shadow_factor = lerp(
// Do deferred shadow (fully lit for now)
float3(1, 1, 1),
// Shadow buffer if its hybrid rendering
buffer_shadow.SampleLevel(linear_sampler, uv, 0.0f).rgb,
// Lerp factor (0: no hybrid, 1: hybrid)
has_shadows);
// Get reflection
float3 reflection = lerp(
// Sample from environment if it IS NOT hybrid rendering
sampled_environment_map,
// Reflection buffer if it IS hybrid rendering
buffer_reflection.SampleLevel(linear_sampler, uv, 0).xyz,
// Lerp factor (0: no hybrid, 1: hybrid)
has_reflections);
// Shade pixel
retval = shade_pixel(pos, V, albedo, metallic, roughness, emissive, normal, irradiance, ao, reflection, sampled_brdf, shadow_factor, has_shadows);
}
else
{
retval = skybox.SampleLevel(linear_sampler, -V, 0.0f);
}
//Temporary hackfix for NaN pixels
if (isnan(retval).x == true)
{
retval = float3(0.0f, 0.0f, 0.0f);
}
//Do shading
output[int2(dispatch_thread_id.xy)] = float4(retval, 1.f);
}
#endif //__DEFERRED_COMPOSITION_PASS_HLSL__
================================================
FILE: resources/shaders/deferred_geometry_pass.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DEFERRED_GEOMETRY_PASS_HLSL__
#define __DEFERRED_GEOMETRY_PASS_HLSL__
//48 KiB; 48 * 1024 / sizeof(MeshNode)
//48 * 1024 / (4 * 4 * 4) = 48 * 1024 / 64 = 48 * 16 = 768
#define MAX_INSTANCES 768
#include "material_util.hlsl"
struct VS_INPUT
{
float3 pos : POSITION;
float2 uv : TEXCOORD;
float3 normal : NORMAL;
float3 tangent : TANGENT;
float3 bitangent : BITANGENT;
};
struct VS_OUTPUT
{
float4 pos : SV_POSITION;
#ifdef IS_HYBRID
float4 prev_pos : PREV_POSITION;
float4 curr_pos : CURR_POSITION;
float4 world_pos : WORLD_POSITION;
#endif
float2 uv : TEXCOORD;
float3 normal : NORMAL;
float3 tangent : TANGENT;
float3 bitangent : BITANGENT;
#ifdef IS_HYBRID
float3 obj_normal : OBJECT_NORMAL;
float3 obj_tangent : OBJECT_TANGENT;
float3 obj_bitangent : OBJECT_BITANGENT;
#endif
};
cbuffer CameraProperties : register(b0)
{
float4x4 view;
float4x4 projection;
float4x4 inv_projection;
float4x4 inv_view;
float4x4 prev_projection;
float4x4 prev_view;
uint is_hybrid;
uint is_path_tracer;
uint is_ao;
uint has_shadows;
float3 padding1;
uint has_reflections;
};
struct ObjectData
{
float4x4 model;
float4x4 prev_model;
};
cbuffer ObjectProperties : register(b1)
{
ObjectData instances[MAX_INSTANCES];
};
VS_OUTPUT main_vs(VS_INPUT input, uint instid : SV_InstanceId)
{
VS_OUTPUT output;
float3 pos = input.pos;
ObjectData inst = instances[instid];
//TODO: Use precalculated MVP or at least VP
float4x4 vm = mul(view, inst.model);
float4x4 mvp = mul(projection, vm);
float4x4 prev_mvp = mul(prev_projection, mul(prev_view, inst.prev_model));
output.pos = mul(mvp, float4(pos, 1.0f));
#ifdef IS_HYBRID
output.curr_pos = output.pos;
output.prev_pos = mul(prev_mvp, float4(pos, 1.0f));
output.world_pos = mul(inst.model, float4(pos, 1.0f));
#endif
output.uv = float2(input.uv.x, 1.0f - input.uv.y);
output.tangent = normalize(mul(inst.model, float4(input.tangent, 0))).xyz;
output.bitangent = normalize(mul(inst.model, float4(input.bitangent, 0))).xyz;
output.normal = normalize(mul(inst.model, float4(input.normal, 0))).xyz;
#ifdef IS_HYBRID
output.obj_normal = input.normal.xyz;
output.obj_tangent = input.tangent.xyz;
output.obj_bitangent = input.bitangent.xyz;
#endif
return output;
}
struct PS_OUTPUT
{
float4 albedo_roughness : SV_TARGET0;
float4 normal_metallic : SV_TARGET1;
float4 emissive_ao : SV_TARGET2;
#ifdef IS_HYBRID
float4 velocity : SV_TARGET3;
float4 depth : SV_TARGET4;
float4 world_position : SV_TARGET5;
#endif
};
Texture2D material_albedo : register(t0);
Texture2D material_normal : register(t1);
Texture2D material_roughness : register(t2);
Texture2D material_metallic : register(t3);
Texture2D material_ao : register(t4);
Texture2D material_emissive : register(t5);
SamplerState s0 : register(s0);
cbuffer MaterialProperties : register(b2)
{
MaterialData data;
}
uint dirToOct(float3 normal)
{
float2 p = normal.xy * (1.0 / dot(abs(normal), 1.0.xxx));
float2 e = normal.z > 0.0 ? p : (1.0 - abs(p.yx)) * (step(0.0,p)*2.0-(float2)(1.0));
return (asuint(f32tof16(e.y)) << 16) + (asuint(f32tof16(e.x)));
}
PS_OUTPUT main_ps(VS_OUTPUT input) : SV_TARGET
{
PS_OUTPUT output;
float3x3 tbn = {input.tangent, input.bitangent, input.normal};
OutputMaterialData output_data = InterpretMaterialData(data,
material_albedo,
material_normal,
material_roughness,
material_metallic,
material_emissive,
material_ao,
s0,
input.uv);
if (output_data.alpha <= 0.5f)
{
discard;
}
float3 normal = normalize(mul(output_data.normal, tbn));
output.albedo_roughness = float4(output_data.albedo.xyz, output_data.roughness);
output.normal_metallic = float4(normal, output_data.metallic);
output.emissive_ao = float4(output_data.emissive, output_data.ao);
#ifdef IS_HYBRID
float3x3 obj_tbn = {input.obj_tangent, input.obj_bitangent, input.obj_normal};
float3 obj_normal = normalize(mul(output_data.normal, obj_tbn));
float2 curr_pos = float2(input.curr_pos.xy / input.curr_pos.w) * 0.5 + 0.5;
float2 prev_pos = float2(input.prev_pos.xy / input.prev_pos.w) * 0.5 + 0.5;
const float epsilon = 1e-5;
float2 motion_vec = lerp(float2(curr_pos.x - prev_pos.x, -(curr_pos.y - prev_pos.y)), float2(0.0, 0.0), input.prev_pos.w < epsilon);
output.velocity = float4(motion_vec.xy, length(fwidth(input.world_pos.xyz)), length(fwidth(normal)));
float linear_z = input.pos.z * input.pos.w;
float prev_z = input.prev_pos.z;
float max_change_z = max(abs(ddx(linear_z)), abs(ddy(linear_z)));
float compressed_obj_normal = asfloat(dirToOct(normalize(obj_normal)));
output.depth = float4(linear_z, max_change_z, prev_z, compressed_obj_normal);
output.world_position = input.world_pos;
#endif
return output;
}
#endif //__DEFERRED_GEOMETRY_PASS_HLSL__
================================================
FILE: resources/shaders/denoising_SVGF.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DENOISING_SVGF_HLSL__
#define __DENOISING_SVGF_HLSL__
Texture2D input_texture : register(t0);
Texture2D motion_texture : register(t1);
Texture2D normal_texture : register(t2);
Texture2D depth_texture : register(t3);
Texture2D in_hist_length_texture : register(t4);
Texture2D prev_input_texture : register(t5);
Texture2D prev_moments_texture : register(t6);
Texture2D prev_normal_texture : register(t7);
Texture2D prev_depth_texture : register(t8);
RWTexture2D<float4> out_color_texture : register(u0);
RWTexture2D<float2> out_moments_texture : register(u1);
RWTexture2D<float> out_hist_length_texture : register(u2);
SamplerState point_sampler : register(s0);
SamplerState linear_sampler : register(s1);
cbuffer DenoiserSettings : register(b0)
{
float blending_alpha;
float blending_moments_alpha;
float l_phi;
float n_phi;
float z_phi;
float step_distance;
float2 padding_2;
};
const static float VARIANCE_CLIPPING_GAMMA = 8.0;
float3 OctToDir(uint octo)
{
float2 e = float2( f16tof32(octo & 0xFFFF), f16tof32((octo>>16) & 0xFFFF) );
float3 v = float3(e, 1.0 - abs(e.x) - abs(e.y));
if (v.z < 0.0)
v.xy = (1.0 - abs(v.yx)) * (step(0.0, v.xy)*2.0 - (float2)(1.0));
return normalize(v);
}
float Luminance(float3 color)
{
return (color.r + color.r + color.b + color.g + color.g + color.g) / 6.0;
}
uint DirToOct(float3 normal)
{
float2 p = normal.xy * (1.0 / dot(abs(normal), 1.0.xxx));
float2 e = normal.z > 0.0 ? p : (1.0 - abs(p.yx)) * (step(0.0, p)*2.0 - (float2)(1.0));
return (asuint(f32tof16(e.y)) << 16) + (asuint(f32tof16(e.x)));
}
void FetchNormalAndLinearZ(in int2 ipos, out float3 norm, out float2 zLinear)
{
norm = normal_texture[ipos];
zLinear = depth_texture[ipos].xy;
}
float NormalDistanceCos(float3 n1, float3 n2, float power)
{
return pow(max(0.0, dot(n1, n2)), 128.0);
//return pow( saturate(dot(n1,n2)), power);
//return 1.0f;
}
float NormalDistanceTan(float3 a, float3 b)
{
const float d = max(1e-8, dot(a, b));
return sqrt(max(0.0, 1.0 - d * d)) / d;
}
float CalcWeights(
float depth_center, float depth_p, float phi_depth,
float3 normal_center, float3 normal_p, float norm_power,
float luminance_direct_center, float luminance_direct_p, float phi_direct)
{
const float w_normal = NormalDistanceCos(normal_center, normal_p, norm_power);
const float w_z = (phi_depth == 0) ? 0.0f : abs(depth_center - depth_p) / phi_depth;
const float w_l_direct = abs(luminance_direct_center - luminance_direct_p) / phi_direct;
const float w_direct = exp(0.0 - max(w_l_direct, 0.0) - max(w_z, 0.0)) * w_normal;
return w_direct;
}
float ComputeWeightNoLuminance(float depth_center, float depth_p, float phi_depth, float3 normal_center, float3 normal_p)
{
const float w_normal = NormalDistanceCos(normal_center, normal_p, n_phi);
const float w_z = abs(depth_center - depth_p) / phi_depth;
return exp(-max(w_z, 0.0)) * w_normal;
}
bool IsReprojectionValid(int2 coord, float z, float z_prev, float fwidth_z, float3 normal, float3 normal_prev, float fwidth_normal)
{
int2 screen_size = int2(0, 0);
input_texture.GetDimensions(screen_size.x, screen_size.y);
bool ret = (coord.x > -1 && coord.x < screen_size.x && coord.y > -1 && coord.y < screen_size.y);
ret = ret && ((abs(z_prev - z) / (fwidth_z + 1e-4)) < 2.0);
ret = ret && ((distance(normal, normal_prev) / (fwidth_normal + 1e-2)) < 16.0);
return ret;
}
bool LoadPrevData(float2 screen_coord, out float4 prev_direct, out float2 prev_moments, out float history_length)
{
float2 screen_size = float2(0.f, 0.f);
input_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = screen_coord / screen_size;
float4 motion = motion_texture.SampleLevel(point_sampler, uv, 0);
float2 q_uv = uv - motion.xy;
float2 prev_coords = q_uv * screen_size;
float4 depth = depth_texture[prev_coords];
float3 normal = OctToDir(asuint(depth.w));
prev_direct = float4(0, 0, 0, 0);
prev_moments = float2(0, 0);
bool v[4];
const float2 pos_prev = prev_coords;
int2 offset[4] = {int2(0, 0), int2(1, 0), int2(0, 1), int2(1, 1)};
bool valid = false;
[unroll]
for(int sample_idx = 0; sample_idx < 4; ++sample_idx)
{
int2 loc = int2(pos_prev) + offset[sample_idx];
float4 depth_prev = prev_depth_texture[loc];
float3 normal_prev = OctToDir(asuint(depth_prev.w));
v[sample_idx] = IsReprojectionValid(loc, depth.z, depth_prev.x, depth.y, normal, normal_prev, motion.w);
valid = valid || v[sample_idx];
}
if(valid)
{
float sum_weights = 0;
float x = frac(pos_prev.x);
float y = frac(pos_prev.y);
float weights[4] = {(1 - x) * (1 - y),
x * (1 - y),
(1 - x) * y,
x * y };
[unroll]
for(int sample_idx = 0; sample_idx < 4; ++sample_idx)
{
int2 loc = int2(pos_prev) + offset[sample_idx];
prev_direct += weights[sample_idx] * prev_input_texture[loc] * float(v[sample_idx]);
prev_moments += weights[sample_idx] * prev_moments_texture[loc] * float(v[sample_idx]);
sum_weights += weights[sample_idx] * float(v[sample_idx]);
}
valid = (sum_weights >= 0.01);
prev_direct = lerp(float4(0, 0, 0, 0), prev_direct / sum_weights, valid);
prev_moments = lerp(float2(0, 0), prev_moments / sum_weights, valid);
}
if(!valid)
{
float cnt = 0.0;
const int radius = 1;
for(int y = -radius; y <= radius; ++y)
{
for(int x = -radius; x <= radius; ++x)
{
int2 p = prev_coords + int2(x, y);
float4 depth_filter = prev_depth_texture[p];
float3 normal_filter = OctToDir(asuint(depth_filter.w));
if(IsReprojectionValid(prev_coords, depth.z, depth_filter.x, depth.y, normal, normal_filter, motion.w))
{
prev_direct += prev_input_texture[p];
prev_moments += prev_moments_texture[p];
cnt += 1.0;
}
}
}
valid = cnt > 0;
prev_direct /= lerp(1, cnt, cnt > 0);
prev_moments /= lerp(1, cnt, cnt > 0);
}
if(valid)
{
history_length = in_hist_length_texture[prev_coords].r;
}
else
{
prev_direct = float4(0, 0, 0, 0);
prev_moments = float2(0, 0);
history_length = 0;
}
return valid;
}
float ComputeVarianceCenter(int2 center)
{
float sum = 0.0;
const float kernel[2][2] = {
{1.0 / 4.0, 1.0 / 8.0},
{1.0 / 8.0, 1.0 / 16.0}
};
const int radius = 1;
[unroll]
for(int y = -radius; y <= radius; ++y)
{
[unroll]
for(int x = -radius; x <= radius; ++x)
{
int2 p = center + int2(x, y);
float k = kernel[abs(x)][abs(y)];
sum += input_texture[p].w * k;
}
}
return sum;
}
float4 LineBoxIntersection(float3 box_min, float3 box_max, float3 c_in, float3 c_hist)
{
float3 p_clip = 0.5 * (box_max + box_min);
float3 e_clip = 0.5 * (box_max - box_min);
float3 v_clip = c_hist - p_clip;
float3 v_unit = v_clip.xyz / e_clip;
float3 a_unit = abs(v_unit);
float ma_unit = max(a_unit.x, max(a_unit.y, a_unit.z));
if(ma_unit > 1.0)
{
return float4((p_clip + v_clip / ma_unit).xyz, ma_unit);
}
else
{
return float4(c_hist.xyz, ma_unit);
}
}
[numthreads(16,16,1)]
void reprojection_cs(int3 dispatch_thread_id : SV_DispatchThreadID)
{
float2 screen_size = float2(0.f, 0.f);
out_color_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = float2(dispatch_thread_id.x / screen_size.x, dispatch_thread_id.y / screen_size.y);
float2 screen_coord = int2(dispatch_thread_id.x, dispatch_thread_id.y);
float4 direct = input_texture[screen_coord];
float4 prev_direct = float4(0.0, 0.0, 0.0, 0.0);
float2 prev_moments = float2(0.0, 0.0);
float history_length = 0.0;
bool success = LoadPrevData(screen_coord, prev_direct, prev_moments, history_length);
if(isnan(prev_direct.x) || isnan(prev_direct.y) || isnan(prev_direct.z))
{
success = false;
prev_direct = 0.f;
prev_moments = 0.f;
history_length = 0.f;
}
float3 moment_1 = float3(0.0, 0.0, 0.0);
float3 moment_2 = float3(0.0, 0.0, 0.0);
float3 clamp_min = 1.0;
float3 clamp_max = 0.0;
[unroll]
for(int y = -2; y <= 2; ++y)
{
[unroll]
for(int x = -2; x <= 2; ++x)
{
float3 color = input_texture[screen_coord + int2(x, y)].xyz;
moment_1 += color;
moment_2 += color * color;
clamp_min = min(color, clamp_min);
clamp_max = max(color, clamp_max);
}
}
float3 mu = moment_1 / 25.0;
float3 sigma = sqrt(moment_2 / 25.0 - mu*mu);
float3 box_min = max(mu - VARIANCE_CLIPPING_GAMMA * sigma, clamp_min);
float3 box_max = min(mu + VARIANCE_CLIPPING_GAMMA * sigma, clamp_max);
float4 clipped = LineBoxIntersection(box_min, box_max, direct.xyz, prev_direct.xyz);
//success = clipped.w > 1.0;
prev_direct = float4(clipped.xyz, prev_direct.w);
history_length = min(32.0, success ? (history_length + 1.0) : 1.0);
const float alpha = lerp(1.0, max(blending_alpha, 1.0/history_length), success);
const float moments_alpha = lerp(1.0, max(blending_moments_alpha, 1.0/history_length), success);
float2 moments = float2(0, 0);
moments.r = Luminance(direct.xyz);
moments.g = moments.r * moments.r;
moments = lerp(prev_moments, moments, moments_alpha);
out_moments_texture[screen_coord] = moments;
out_hist_length_texture[screen_coord] = history_length;
float variance = max(0.f, moments.g - moments.r * moments.r);
direct = lerp(prev_direct, direct, alpha);
out_color_texture[screen_coord] = float4(direct.xyz, variance);
}
[numthreads(16,16,1)]
void filter_moments_cs(int3 dispatch_thread_id : SV_DispatchThreadID)
{
float2 screen_size = float2(0.f, 0.f);
out_color_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = float2(dispatch_thread_id.x / screen_size.x, dispatch_thread_id.y / screen_size.y);
float2 screen_coord = int2(dispatch_thread_id.x, dispatch_thread_id.y);
float h = in_hist_length_texture[screen_coord].r;
if(h < 4.0)
{
float sum_weights = 0.0;
float3 sum_direct = float3(0.0, 0.0, 0.0);
float2 sum_moments = float2(0.0, 0.0);
const float4 direct_center = input_texture[screen_coord];
const float luminance_direct_center = Luminance(direct_center.xyz);
float3 normal_center = float3(0.0, 0.0, 0.0);
float2 depth_center = float2(0.0, 0.0);
FetchNormalAndLinearZ(screen_coord, normal_center, depth_center);
if(depth_center.x < 0.0)
{
out_color_texture[screen_coord] = direct_center;
return;
}
const float phi_direct = l_phi;
const float phi_depth = max(depth_center.y, 1e-8) * 3.0;
const int radius = 3;
[unroll]
for(int y = -radius; y <= radius; ++y)
{
[unroll]
for(int x = -radius; x <= radius; ++x)
{
const int2 p = screen_coord + int2(x, y);
const bool inside = p.x >= 0 && p.x < screen_size.x && p.y >= 0 && p.y < screen_size.y;
const bool same_pixel = (x==0) && (y==0);
const float kernel = 1.0;
if(inside)
{
const float3 direct_p = input_texture[p].xyz;
const float2 moments_p = prev_moments_texture[p].xy;
if(isnan(direct_p.x) || isnan(direct_p.y) || isnan(direct_p.z) || isnan(moments_p.x) || isnan(moments_p.y))
{
continue;
}
const float l_direct_p = Luminance(direct_p);
float3 normal_p;
float2 z_p;
FetchNormalAndLinearZ(p, normal_p, z_p);
const float w = CalcWeights(
depth_center.x, z_p.x, phi_depth * length(float2(x, y)),
normal_center, normal_p, n_phi,
luminance_direct_center, l_direct_p, l_phi);
if(isnan(w))
{
continue;
}
sum_weights += w;
sum_direct += direct_p * w;
sum_moments += moments_p * float2(w.xx);
}
}
}
sum_weights = max(sum_weights, 1e-6f);
sum_direct /= sum_weights;
sum_moments /= float2(sum_weights.xx);
float variance = sum_moments.y - sum_moments.x * sum_moments.x;
variance *= 4.0/h;
out_color_texture[screen_coord] = float4(sum_direct.xyz, variance);
}
else
{
out_color_texture[screen_coord] = input_texture[screen_coord];
}
}
[numthreads(16,16,1)]
void wavelet_filter_cs(int3 dispatch_thread_id : SV_DispatchThreadID)
{
float2 screen_size = float2(0.f, 0.f);
out_color_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = float2(dispatch_thread_id.x / screen_size.x, dispatch_thread_id.y / screen_size.y);
float2 screen_coord = int2(dispatch_thread_id.x, dispatch_thread_id.y);
const float eps_variance = 1e-10;
const float kernel_weights[3] = {1.0, 2.0 / 3.0, 1.0 / 6.0};
const float4 direct_center = input_texture[screen_coord];
const float luminance_direct_center = Luminance(direct_center.xyz);
const float variance = ComputeVarianceCenter(int2(screen_coord.xy));
out_color_texture[screen_coord] = direct_center;
const float history_length = in_hist_length_texture[screen_coord].r;
float3 normal_center;
float2 depth_center;
FetchNormalAndLinearZ(screen_coord, normal_center, depth_center);
if(depth_center.x < 0)
{
out_color_texture[screen_coord] = direct_center;
return;
}
const float phi_l_direct = l_phi * sqrt(max(0.0, eps_variance + variance));
const float phi_depth = max(depth_center.y, 1e-8) * step_distance;
float sum_weights = 1.0;
float4 sum_direct = direct_center;
[unroll]
for(int y = -2; y <= 2; ++y)
{
[unroll]
for(int x = -2; x <= 2; ++x)
{
const int2 p = int2(screen_coord.xy) + int2(x, y) * step_distance;
const bool inside = p.x >= 0 && p.x < screen_size.x && p.y >= 0 && p.y < screen_size.y;
const float kernel = kernel_weights[abs(x)] * kernel_weights[abs(y)];
if(inside && (x != 0 || y != 0))
{
const float4 direct_p = input_texture[p];
if(isnan(direct_p.x) || isnan(direct_p.y) || isnan(direct_p.z) || isnan(direct_p.w))
{
continue;
}
float3 normal_p;
float2 depth_p;
FetchNormalAndLinearZ(p, normal_p, depth_p);
const float luminance_direct_p = Luminance(direct_p.xyz);
const float w = CalcWeights(
depth_center.x, depth_p.x, phi_depth*length(float2(x, y)),
normal_center, normal_p, n_phi,
luminance_direct_center, luminance_direct_p, phi_l_direct
);
if(isnan(w))
{
continue;
}
const float w_direct = w * kernel;
sum_weights += w_direct;
sum_direct += float4(w_direct.xxx, w_direct * w_direct) * direct_p;
}
}
}
sum_weights = max(sum_weights, 1e-6f);
out_color_texture[screen_coord] = float4(sum_direct / float4(sum_weights.xxx, sum_weights * sum_weights));
}
#endif //__DENOISING_SVGF_HLSL__
================================================
FILE: resources/shaders/denoising_reflections.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DENOISING_REFLECTIONS_HLSL__
#define __DENOISING_REFLECTIONS_HLSL__
#include "pbr_util.hlsl"
#include "rand_util.hlsl"
Texture2D input_texture : register(t0);
Texture2D ray_raw_texture : register(t1);
Texture2D dir_hit_t_texture : register(t2);
Texture2D albedo_roughness_texture : register(t3);
Texture2D normal_metallic_texture : register(t4);
Texture2D motion_texture : register(t5); // xy: motion, z: fwidth position, w: fwidth normal
Texture2D linear_depth_texture : register(t6);
Texture2D world_position_texture : register(t7);
Texture2D in_history_texture : register(t8);
Texture2D accum_texture : register(t9);
Texture2D prev_normal_texture : register(t10);
Texture2D prev_depth_texture : register(t11);
Texture2D in_moments_texture : register(t12);
RWTexture2D<float4> output_texture : register(u0);
RWTexture2D<float> out_history_texture : register(u1);
RWTexture2D<float2> out_moments_texture : register(u2);
SamplerState point_sampler : register(s0);
SamplerState linear_sampler : register(s0);
cbuffer CameraProperties : register(b0)
{
float4x4 view;
float4x4 projection;
float4x4 inv_projection;
float4x4 inv_view;
float4x4 prev_projection;
float4x4 prev_view;
uint is_hybrid;
uint is_path_tracer;
uint is_ao;
uint has_shadows;
float3 padding1;
uint has_reflections;
};
cbuffer DenoiserSettings : register(b1)
{
float color_integration_alpha;
float moments_integration_alpha;
float variance_clipping_sigma;
float roughness_reprojection_threshold;
int max_history_samples;
float n_phi;
float z_phi;
float l_phi;
};
cbuffer WaveletPass : register(b2)
{
float wavelet_size;
}
float3 OctToDir(uint octo)
{
float2 e = float2( f16tof32(octo & 0xFFFF), f16tof32((octo>>16) & 0xFFFF) );
float3 v = float3(e, 1.0 - abs(e.x) - abs(e.y));
if (v.z < 0.0f)
v.xy = (1.0f - abs(v.yx)) * (step(0.0f, v.xy) * 2.0f - float2(1.0f,1.0f));
return normalize(v);
}
float Luminance(float3 color)
{
return (color.r + color.r + color.b + color.g + color.g + color.g) / 6.0f;
}
void FetchNormalAndLinearZ(in float2 ipos, out float3 norm, out float2 zLinear)
{
norm = normal_metallic_texture[ipos].xyz;
zLinear = linear_depth_texture[ipos].xy;
}
float NormalDistanceCos(float3 n1, float3 n2, float power)
{
return pow(max(0.0f, dot(n1, n2)), power);
}
float ComputeWeight(
float depth_center, float depth_p, float phi_depth,
float3 normal_center, float3 normal_p, float norm_power,
float luminance_direct_center, float luminance_direct_p, float phi_direct)
{
const float w_normal = NormalDistanceCos(normal_center, normal_p, norm_power);
const float w_z = (phi_depth == 0.f) ? 0.0f : abs(depth_center - depth_p) / phi_depth;
const float w_l_direct = abs(luminance_direct_center - luminance_direct_p) / phi_direct;
const float w_direct = exp(0.0f - max(w_l_direct, 0.0f) - max(w_z, 0.0f)) * w_normal;
return w_direct;
}
float ComputeWeightNoLuminance(float depth_center, float depth_p, float phi_depth, float3 normal_center, float3 normal_p)
{
const float w_normal = NormalDistanceCos(normal_center, normal_p, 128.f);
const float w_z = abs(depth_center - depth_p) / phi_depth;
return exp(-max(w_z, 0.0f)) * w_normal;
}
bool IsReprojectionValid(float2 coord, float z, float z_prev, float fwidth_z, float3 normal, float3 normal_prev, float fwidth_normal)
{
int2 screen_size = int2(0, 0);
output_texture.GetDimensions(screen_size.x, screen_size.y);
bool ret = (coord.x >= 0.f && coord.x < screen_size.x && coord.y >= 0.f && coord.y < screen_size.y);
ret = ret && ((distance(normal, normal_prev) / (fwidth_normal + 1e-2)) < 16.0);
return ret;
}
bool LoadPrevData(float2 screen_coord, inout float2 found_pos, out float4 prev_direct, out float2 prev_moments, out float history_length)
{
float2 screen_size = float2(0.f, 0.f);
output_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = screen_coord / screen_size;
float4 motion = motion_texture.SampleLevel(point_sampler, uv, 0);
float2 q_uv = uv - motion.xy;
float2 prev_coords = q_uv * screen_size;
const float roughness = albedo_roughness_texture[screen_coord].w;
float4 depth = linear_depth_texture[prev_coords];
float3 normal = OctToDir(asuint(depth.w));
prev_direct = float4(0.0f, 0.0f, 0.0f, 0.0f);
prev_moments = float2(0.0f, 0.0f);
bool v[4];
const float2 pos_prev = prev_coords;
int2 offset[4] = {int2(0, 0), int2(1, 0), int2(0, 1), int2(1, 1)};
bool valid = false;
[unroll]
for(int sample_idx = 0; sample_idx < 4; ++sample_idx)
{
float2 loc = pos_prev + offset[sample_idx];
float4 depth_prev = prev_depth_texture[loc];
float3 normal_prev = OctToDir(asuint(depth_prev.w));
v[sample_idx] = IsReprojectionValid(loc, depth.z, depth_prev.x, depth.y, normal, normal_prev, motion.w);
valid = valid || v[sample_idx];
}
if(valid)
{
float sum_weights = 0.0f;
float x = frac(pos_prev.x);
float y = frac(pos_prev.y);
float weights[4] = {(1.0f - x) * (1.0f - y),
x * (1.0f - y),
(1.0f - x) * y,
x * y };
[unroll]
for(int sample_idx = 0; sample_idx < 4; ++sample_idx)
{
float2 loc = pos_prev + offset[sample_idx];
prev_direct += weights[sample_idx] * accum_texture[loc] * float(v[sample_idx]);
prev_moments += weights[sample_idx] * in_moments_texture[loc].xy * float(v[sample_idx]);
sum_weights += weights[sample_idx] * float(v[sample_idx]);
}
valid = (sum_weights >= 0.01f);
prev_direct = lerp(float4(0.0f, 0.0f, 0.0f, 0.0f), prev_direct / sum_weights, valid);
prev_moments = lerp(float2(0.0f, 0.0f), prev_moments / sum_weights, valid);
}
if(!valid)
{
float cnt = 0.0f;
const int radius = 1;
for(int y = -radius; y <= radius; ++y)
{
for(int x = -radius; x <= radius; ++x)
{
float2 p = prev_coords + float2(x, y);
float4 depth_filter = prev_depth_texture[p];
float3 normal_filter = OctToDir(asuint(depth_filter.w));
if(IsReprojectionValid(prev_coords, depth.z, depth_filter.x, depth.y, normal, normal_filter, motion.w))
{
prev_direct += accum_texture[p];
prev_moments += in_moments_texture[p].xy;
cnt += 1.0;
}
}
}
valid = cnt > 0;
prev_direct /= lerp(1, cnt, cnt > 0);
prev_moments /= lerp(1, cnt, cnt > 0);
}
if(valid)
{
history_length = in_history_texture[prev_coords].r;
}
else
{
prev_direct = float4(0.0f, 0.0f, 0.0f, 0.0f);
prev_moments = float2(0.0f, 0.0f);
history_length = 0;
}
found_pos = lerp(float2(-1.0f, -1.0f), pos_prev, valid);
return valid;
}
float ComputeVarianceCenter(int2 center)
{
float sum = 0.0f;
const float kernel[2][2] = {
{1.0f / 4.0f, 1.0f / 8.0f},
{1.0f / 8.0f, 1.0f / 16.0f}
};
const int radius = 1;
[unroll]
for(int y = -radius; y <= radius; ++y)
{
[unroll]
for(int x = -radius; x <= radius; ++x)
{
int2 p = center + int2(x, y);
float k = kernel[abs(x)][abs(y)];
sum += input_texture[p].w * k;
}
}
return sum;
}
float4 LineBoxIntersection(float3 box_min, float3 box_max, float3 c_in, float3 c_hist)
{
float3 p_clip = 0.5f * (box_max + box_min);
float3 e_clip = 0.5f * (box_max - box_min);
float3 v_clip = c_hist - p_clip;
float3 v_unit = v_clip.xyz / e_clip;
float3 a_unit = abs(v_unit);
float ma_unit = max(a_unit.x, max(a_unit.y, a_unit.z));
if(ma_unit > 1.0f)
{
return float4((p_clip + v_clip / ma_unit).xyz, ma_unit);
}
else
{
return float4(c_hist.xyz, ma_unit);
}
}
[numthreads(16, 16, 1)]
void temporal_denoiser_cs(int3 dispatch_thread_id : SV_DispatchThreadID)
{
float2 screen_coord = float2(dispatch_thread_id.xy);
float2 screen_size = float2(0.0f, 0.0f);
output_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = screen_coord / (screen_size - 1.0f);
float4 accum_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
float2 prev_moments = float2(0.0f, 0.0f);
float history = 0;
float2 prev_pos = float2(0.0f, 0.0f);
bool valid = LoadPrevData(screen_coord, prev_pos, accum_color, prev_moments, history);
history = lerp(0, history, valid);
float4 input_color = input_texture[screen_coord];
float pdf = ray_raw_texture.SampleLevel(point_sampler, uv, 0).w;
if(pdf <= 0.0f)
{
output_texture[screen_coord] = float4(input_color.xyz, 0.f);
return;
}
float3 moment_1 = float3(0.0f, 0.0f, 0.0f);
float3 moment_2 = float3(0.0f, 0.0f, 0.0f);
float3 clamp_min = 1.0f;
float3 clamp_max = 0.0f;
[unroll]
for(int y = -3; y <= 3; ++y)
{
[unroll]
for(int x = -3; x <= 3; ++x)
{
float3 color = input_texture[screen_coord + int2(x, y)].xyz;
moment_1 += color;
moment_2 += color * color;
clamp_min = min(color, clamp_min);
clamp_max = max(color, clamp_max);
}
}
float3 mu = moment_1 / 49.0f;
float3 sigma = sqrt(moment_2 / 49.0f - mu*mu);
float3 box_min = mu - variance_clipping_sigma * sigma;
float3 box_max = mu + variance_clipping_sigma * sigma;
float4 clipped = LineBoxIntersection(box_min, box_max, input_color.xyz, accum_color.xyz);
const float roughness = albedo_roughness_texture[screen_coord].w;
//perhaps replace the 0.25 with a clamping strength variable for the settings screen
accum_color = lerp(clipped, accum_color, pow(clamp(roughness, 0.0f, 1.0f), 0.25f));
history = min(max_history_samples, history + 1);
const float alpha = lerp(1.0f, max(color_integration_alpha, 1.0f/history), valid);
const float moments_alpha = lerp(1.0f, max(moments_integration_alpha, 1.0f/history), valid);
float2 cur_moments = float2(0.0f, 0.0f);
cur_moments.x = Luminance(input_color.xyz);
cur_moments.y = cur_moments.x * cur_moments.x;
cur_moments = lerp(prev_moments, cur_moments, moments_alpha);
float variance = cur_moments.y - cur_moments.x * cur_moments.x;
float3 output = lerp(accum_color, input_color, alpha);
output_texture[floor(screen_coord)] = float4(output.xyz, variance);
out_history_texture[floor(screen_coord)] = history;
out_moments_texture[floor(screen_coord)] = cur_moments;
}
[numthreads(16, 16, 1)]
void variance_estimator_cs(int3 dispatch_thread_id : SV_DispatchThreadID)
{
float2 screen_coord = float2(dispatch_thread_id.xy);
float2 screen_size = float2(0.f, 0.f);
output_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = screen_coord / screen_size;
float history = in_history_texture[screen_coord].r;
[branch]
if(history < 5.f)
{
float sum_weights = 0.0f;
float3 sum_direct = float3(0.0f, 0.0f, 0.0f);
float2 sum_moments = float2(0.0f, 0.0f);
const float4 direct_center = input_texture[screen_coord];
float3 normal_center = float3(0.0f, 0.0f, 0.0f);
float2 depth_center = float2(0.0f, 0.0f);
FetchNormalAndLinearZ(screen_coord, normal_center, depth_center);
if(depth_center.x < 0.0f)
{
output_texture[screen_coord] = direct_center;
return;
}
const float phi_direct = l_phi;
const float phi_depth = max(depth_center.y, 1e-8) * 3.0f;
const int radius = 3.f;
[unroll]
for(int y = -radius; y <= radius; ++y)
{
[unroll]
for(int x = -radius; x <= radius; ++x)
{
const int2 p = screen_coord + int2(x, y);
const bool inside = p.x >= 0.f && p.x < screen_size.x && p.y >= 0.f && p.y < screen_size.y;
const bool same_pixel = (x==0.f) && (y==0.f);
const float kernel = 1.0f;
if(inside)
{
const float3 direct_p = input_texture[p].xyz;
const float2 moments_p = in_moments_texture[p].xy;
float3 normal_p;
float2 z_p;
FetchNormalAndLinearZ(p, normal_p, z_p);
const float w = ComputeWeightNoLuminance(
depth_center.x, z_p.x, phi_depth * length(float2(x, y)),
normal_center, normal_p);
if(isnan(direct_p.x) || isnan(direct_p.y) || isnan(direct_p.z) || isnan(w))
{
continue;
}
sum_weights += w;
sum_direct += direct_p * w;
sum_moments += moments_p * float2(w.xx);
}
}
}
sum_weights = max(sum_weights, 1e-6f);
sum_direct /= sum_weights;
sum_moments /= float2(sum_weights.xx);
float variance = sum_moments.y - sum_moments.x * sum_moments.x;
variance *= 5.0f/history;
output_texture[screen_coord] = float4(sum_direct.xyz, variance);
}
else
{
output_texture[screen_coord] = input_texture[screen_coord];
}
}
[numthreads(16, 16, 1)]
void spatial_denoiser_cs(int3 dispatch_thread_id : SV_DispatchThreadID)
{
float2 screen_coord = float2(dispatch_thread_id.xy);
float2 screen_size = float2(0.0f, 0.0f);
output_texture.GetDimensions(screen_size.x, screen_size.y);
float2 uv = screen_coord / screen_size;
const float eps_variance = 1e-10;
const float kernel_weights[3] = {1.0f, 2.0f / 3.0f, 1.0f / 6.0f};
const float4 direct_center = input_texture[screen_coord];
const float luminance_direct_center = Luminance(direct_center.xyz);
const float variance = ComputeVarianceCenter(int2(screen_coord.xy));
if(isnan(variance))
{
output_texture[screen_coord] = float4(0.0f, 1.0f, 0.0f, 0.0f);
return;
}
output_texture[screen_coord] = direct_center;
const float history_length = in_history_texture[screen_coord].r;
float3 normal_center;
float2 depth_center;
FetchNormalAndLinearZ(screen_coord, normal_center, depth_center);
if(depth_center.x < 0.0f)
{
output_texture[screen_coord] = direct_center;
return;
}
const float roughness = albedo_roughness_texture[screen_coord].w;
const float phi_l_direct = l_phi * sqrt(max(0.0f, variance));
const float phi_depth = max(depth_center.y, 1e-8) * wavelet_size;
float sum_weights = 1.0f;
float4 sum_direct = direct_center;
[unroll]
for(int y = -2; y <= 2; ++y)
{
[unroll]
for(int x = -2; x <= 2; ++x)
{
const int2 p = int2(screen_coord.xy) + int2(x, y) * wavelet_size;
const bool inside = p.x >= 0 && p.x < screen_size.x && p.y >= 0 && p.y < screen_size.y;
const float kernel = kernel_weights[abs(x)] * kernel_weights[abs(y)];
if(inside && (x != 0 || y != 0))
{
const float4 direct_p = input_texture[p];
const float luminance_direct_p = Luminance(direct_p.xyz);
float3 normal_p;
float2 depth_p;
FetchNormalAndLinearZ(p, normal_p, depth_p);
const float w = ComputeWeight(
depth_center.x, depth_p.x, phi_depth*length(float2(x, y)),
normal_center, normal_p, n_phi,
luminance_direct_center, luminance_direct_p, phi_l_direct) * sqrt(max(1e-15f, roughness));
const float w_direct = w * kernel;
sum_weights += w_direct;
sum_direct += float4(w_direct.xxx, w_direct * w_direct) * direct_p;
}
}
}
output_texture[screen_coord] = sum_direct / sum_weights;
}
#endif
================================================
FILE: resources/shaders/denoising_spatial_reconstruction.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DENOISING_SPATIAL_RECONSTRUCTION_HLSL__
#define __DENOISING_SPATIAL_RECONSTRUCTION_HLSL__
#include "pbr_util.hlsl"
#include "rand_util.hlsl"
cbuffer CameraProperties : register(b0)
{
float4x4 inv_vp;
float4x4 inv_view;
float padding;
uint frame_idx;
float near_plane, far_plane;
};
RWTexture2D<float4> filtered : register(u0);
Texture2D reflection_pdf : register(t0);
Texture2D dir_hit_t : register(t1);
Texture2D albedo_roughness : register(t2);
Texture2D normal_metallic : register(t3);
Texture2D depth_buffer : register(t4);
SamplerState nearest_sampler : register(s0);
SamplerState linear_sampler : register(s1);
float linearize_depth(float D)
{
float z_n = D * 2.0f - 1.0f;
return 2.0f * near_plane * far_plane / (far_plane + near_plane - z_n * (far_plane - near_plane));
}
//Get total weight from neighbor using normal and normalized depth from both neighbor and center
float neighbor_edge_weight(float3 N, float3 N_neighbor, float D, float D_neighbor, float2 uv)
{
return float(uv.x >= 0.f && uv.y >= 0.f && uv.x <= 1.f && uv.y <= 1.f) * (D != 1.0f && D_neighbor != 1.0f);
}
//Hardcode the samples for now; settings: kernelSize=5, points=16
//https://github.com/Nielsbishere/NoisePlayground/blob/master/bluenoise_test.py
static const uint sample_count = 16;
static const float2 samples[4][16] = {
{
float2(0.f , 0.f), float2(-1.f , -1.f), float2(1.f , 0.f), float2(-2.f , -1.f),
float2(-2.f , 1.f), float2(0.f , -3.f), float2(2.f , -2.f), float2(1.f , 2.f),
float2(0.f , 3.f), float2(-4.f , -1.f), float2(0.f , -4.f), float2(-2.f , 3.f),
float2(-4.f , 1.f), float2(3.f , 1.f), float2(3.f , -3.f), float2(4.f , 0.f)
},
{
float2(0.f , 0.f), float2(1.f , -1.f), float2(0.f , -2.f), float2(-1.f , -2.f),
float2(-1.f , 2.f), float2(0.f , 2.f), float2(2.f , 0.f), float2(-3.f , 1.f),
float2(-3.f , -2.f), float2(1.f , -3.f), float2(-3.f , 2.f), float2(3.f , 0.f),
float2(-2.f , -4.f), float2(1.f , 3.f), float2(-4.f , -2.f), float2(2.f , 3.f)
},
{
float2(0.f , 0.f), float2(-1.f , 0.f), float2(0.f , 1.f), float2(-2.f , 0.f),
float2(2.f , -1.f), float2(-1.f , -3.f), float2(-3.f , -1.f), float2(2.f , 2.f),
float2(2.f , -3.f), float2(3.f , -1.f), float2(-3.f , -3.f), float2(-4.f , 0.f),
float2(-1.f , -4.f), float2(-4.f , 2.f), float2(-3.f , 3.f), float2(4.f , -1.f)
},
{
float2(0.f , 0.f), float2(0.f , -1.f), float2(-1.f , 1.f), float2(-2.f , -2.f),
float2(1.f , 1.f), float2(1.f , -2.f), float2(-3.f , 0.f), float2(2.f , 1.f),
float2(-2.f , -3.f), float2(-2.f , 2.f), float2(-1.f , 3.f), float2(1.f , -4.f),
float2(3.f , -2.f), float2(3.f , 2.f), float2(-4.f , -3.f), float2(0.f , 4.f)
}
};
//Sample a neighbor; 0,0 -> 1,1; outside of that range indicates an invalid uv
float2 sample_neighbor_uv(uint sampleId, uint2 full_res_pixel, uint2 resolution, float2 rand, float kernelSize)
{
uint pixId = full_res_pixel.x % 2 + full_res_pixel.y % 2 * 2;
float2 offset = samples[pixId][sampleId] * kernelSize;
offset = mul(float2x2(rand.x, rand.y, -rand.y, rand.x), offset);
return (float2(full_res_pixel / 2.f) + offset) / float2(resolution / 2.f - 1.f);
}
static const float3 luminance = float3(0.2126f, 0.7152f, 0.0722f);
float3 unpack_position(float2 uv, float depth)
{
// Get world space position
const float4 ndc = float4(uv * 2.0f - 1.0f, depth, 1.0f);
float4 wpos = mul(inv_vp, ndc);
return (wpos.xyz / wpos.w).xyz;
}
[numthreads(16, 16, 1)]
void main(int3 pix3 : SV_DispatchThreadID)
{
//Get dispatch dimensions
uint2 pix = uint2(pix3.xy);
uint width, height;
depth_buffer.GetDimensions(width, height);
//Get per pixel values
const float depth = depth_buffer[pix].r;
const float2 uv = float2(pix.xy) / float2(width - 1.f, height - 1.f);
const float3 pos = unpack_position(uv, depth);
const float3 camera_pos = float3(inv_view[0][3], inv_view[1][3], inv_view[2][3]);
const float3 V = normalize(camera_pos - pos);
float roughness = albedo_roughness[pix].w;
const float3 N = normalize(normal_metallic[pix].xyz);
const float pdf = reflection_pdf.SampleLevel(nearest_sampler, uv, 0).w;
float3 result3;
//pdf < 0 disables spatial reconstruction
if (pdf >= 0)
{
//Weigh the samples correctly
float3 result = float3(0.f, 0.f, 0.f);
float weight_sum = 0.0f;
uint rand_seed = initRand(pix.x + pix.y * width, frame_idx);
float distance = length(camera_pos - pos);
float sampleCountScalar = lerp(1.f, (1.f - distance / far_plane) * roughness, 1);
roughness = max(roughness, 1e-2);
float kernel_size = 8.f;
for (uint i = 0; i < max(ceil(kernel_size), 1); ++i) {
//Get sample related data
float2 random = float2(nextRand(rand_seed), nextRand(rand_seed));
const float2 neighbor_uv = sample_neighbor_uv(i, pix, uint2(width, height), random, 1);
const float depth_neighbor = depth_buffer.SampleLevel(nearest_sampler, neighbor_uv, 0).r;
const float3 pos_neighbor = unpack_position(neighbor_uv, depth_neighbor);
const float4 hit_t = dir_hit_t.SampleLevel(nearest_sampler, neighbor_uv, 0);
const float3 V_neighbor = normalize(camera_pos - pos_neighbor);
const float4 reflection_pdf_neighbor = reflection_pdf.SampleLevel(nearest_sampler, neighbor_uv, 0);
if(reflection_pdf_neighbor.w>0.0)
{
const float3 color = clamp(reflection_pdf_neighbor.xyz, 0, 1);
const float3 L = hit_t.xyz;
const float pdf_neighbor = max(reflection_pdf_neighbor.w, 1e-5);
const float3 N_neighbor = normalize(normal_metallic.SampleLevel(nearest_sampler, neighbor_uv, 0).xyz);
//Calculate weight and weight sum
const float neighbor_weight = neighbor_edge_weight(N, N_neighbor, depth, depth_neighbor, neighbor_uv);
float weight = (brdf_weight(-V, L, N, roughness) / pdf_neighbor) * neighbor_weight;
weight = isnan(weight) || isinf(weight) ? 0 : weight;
result += color * weight;
weight_sum += weight;
}
}
result3 = result / weight_sum;
if(weight_sum == 0.0f)
{
result3 = reflection_pdf.SampleLevel(nearest_sampler, uv, 0).xyz;
}
if(isnan(weight_sum) == true)
{
result3 = float3(0, 0, 1);
filtered[pix] = float4(result3, 1);
return;
}
}
else
{
result3 = reflection_pdf.SampleLevel(nearest_sampler, uv, 0).xyz;
}
filtered[pix] = float4(result3, 1);
}
#endif
================================================
FILE: resources/shaders/dxr_ambient_occlusion.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_AMBIENT_OCCLUSION_HLSL__
#define __DXR_AMBIENT_OCCLUSION_HLSL__
#include "rand_util.hlsl"
#include "dxr_global.hlsl"
RWTexture2D<float4> output : register(u0); // x: AO value
Texture2D gbuffer_normal : register(t1);
Texture2D gbuffer_depth : register(t2);
struct AOHitInfo
{
float is_hit;
float thisvariablesomehowmakeshybridrenderingwork_killme;
};
cbuffer CBData : register(b0)
{
float4x4 inv_vp;
float4x4 inv_view;
float bias;
float radius;
float power;
float max_distance;
float2 padding;
float frame_idx;
unsigned int sample_count;
};
struct Attributes { };
float3 unpack_position(float2 uv, float depth)
{
// Get world space position
const float4 ndc = float4(uv * 2.0 - 1.0, depth, 1.0);
float4 wpos = mul(inv_vp, ndc);
return (wpos.xyz / wpos.w).xyz;
}
bool TraceAORay(uint idx, float3 origin, float3 direction, float far, unsigned int depth)
{
// Define a ray, consisting of origin, direction, and the min-max distance values
RayDesc ray;
ray.Origin = origin;
ray.Direction = direction;
ray.TMin = 0.f;
ray.TMax = far;
AOHitInfo payload = { 1.0f, 0.0f };
// Trace the ray
TraceRay(
Scene,
RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH | RAY_FLAG_SKIP_CLOSEST_HIT_SHADER,
~0, // InstanceInclusionMask
0, // RayContributionToHitGroupIndex
0, // MultiplierForGeometryContributionToHitGroupIndex
0, // miss shader index is set to idx but can probably be anything.
ray,
payload);
return payload.is_hit;
}
[shader("raygeneration")]
void AORaygenEntry()
{
// Texture UV coordinates [0, 1]
float2 uv = float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy - 1);
uint rand_seed = initRand(DispatchRaysIndex().x + DispatchRaysIndex().y * DispatchRaysDimensions().x, frame_idx);
// Screen coordinates [0, resolution] (inverted y)
int2 screen_co = DispatchRaysIndex().xy;
float3 normal = gbuffer_normal[screen_co].xyz;
float depth = gbuffer_depth[screen_co].x;
float3 wpos = unpack_position(float2(uv.x, 1.f - uv.y), depth);
float3 camera_pos = float3(inv_view[0][3], inv_view[1][3], inv_view[2][3]);
float cam_distance = length(wpos-camera_pos);
if(cam_distance < max_distance)
{
//SPP decreases the closer a pixel is to the max distance
//Total is always calculated using the full sample count to have further pixels less occluded
int spp = min(sample_count, round(sample_count * ((max_distance - cam_distance)/max_distance)));
int ao_value = sample_count;
for(uint i = 0; i< spp; i++)
{
ao_value -= TraceAORay(0, wpos + normal * bias , getCosHemisphereSample(rand_seed, normal), radius, 0);
}
output[DispatchRaysIndex().xy].x = pow(ao_value/float(sample_count), power);
}
else
{
output[DispatchRaysIndex().xy].x = 1.f;
}
}
[shader("miss")]
void MissEntry(inout AOHitInfo hit : SV_RayPayload)
{
hit.is_hit = 0.0f;
}
#endif //__DXR_AMBIENT_OCCLUSION_HLSL__
================================================
FILE: resources/shaders/dxr_functions.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_FUNCTIONS_HLSL__
#define __DXR_FUNCTIONS_HLSL__
float3 HitAttribute(float3 a, float3 b, float3 c, BuiltInTriangleIntersectionAttributes attr)
{
float3 vertexAttribute[3];
vertexAttribute[0] = a;
vertexAttribute[1] = b;
vertexAttribute[2] = c;
return vertexAttribute[0] +
attr.barycentrics.x * (vertexAttribute[1] - vertexAttribute[0]) +
attr.barycentrics.y * (vertexAttribute[2] - vertexAttribute[0]);
}
uint3 Load3x32BitIndices(ByteAddressBuffer buffer, uint offsetBytes)
{
// Load first 2 indices
return buffer.Load3(offsetBytes);
}
// Retrieve hit world position.
float3 HitWorldPosition()
{
return WorldRayOrigin() + RayTCurrent() * WorldRayDirection();
}
float3 unpack_position(float2 uv, float depth, float4x4 inv_vp)
{
// Get world space position
const float4 ndc = float4(uv * 2.0 - 1.0, depth, 1.0);
float4 wpos = mul(inv_vp, ndc);
return (wpos.xyz / wpos.w).xyz;
}
float3 CalcPeturbedNormal(float3 normal, float3 normal_map, float3 tangent, float3 bitangent, float3 V, out float3 world_normal)
{
float3x4 object_to_world = ObjectToWorld3x4();
float3 N = normalize(mul(object_to_world, float4(normal, 0)));
float3 T = normalize(mul(object_to_world, float4(tangent, 0)));
#ifndef CALC_BITANGENT
const float3 B = normalize(mul(object_to_world, float4(bitangent, 0)));
#else
T = normalize(T - dot(T, N) * N);
float3 B = cross(N, T);
#endif
const float3x3 TBN = float3x3(T, B, N);
float3 fN = normalize(mul(normal_map, TBN));
world_normal = N;
return fN;
}
float3 CalcPeturbedNormal(float3 normal, float3 normal_map, float3 tangent, float3 bitangent, float3 V)
{
float3 temp = 0;
return CalcPeturbedNormal(normal, normal_map, tangent, bitangent, V, temp);
}
#endif //__DXR_FUNCTIONS_HLSL__
================================================
FILE: resources/shaders/dxr_global.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_GLOBAL_HLSL__
#define __DXR_GLOBAL_HLSL__
#define MAX_RECURSION 2
//#define FOUR_X_A
//#define PATH_TRACING
//#define DEPTH_OF_FIELD
#define EPSILON 0.1
#define SOFT_SHADOWS
#define MAX_SHADOW_SAMPLES 1
//#define PERFECT_MIRROR_REFLECTIONS
#define GROUND_TRUTH_REFLECTIONS
#define MAX_GT_REFLECTION_SAMPLES 4
//#define DISABLE_SPATIAL_RECONSTRUCTION
#define RUSSIAN_ROULETTE
#define NO_PATH_TRACED_NORMALS
#define CALC_BITANGENT // calculate bitangent in the shader instead of using the bitangent uploaded
#ifdef FALLBACK
#undef MAX_RECURSION
#define MAX_RECURSION 1
#undef GROUND_TRUTH_REFLECTIONS
#undef MAX_GT_REFLECTION_SAMPLES
#define MAX_GT_REFLECTION_SAMPLES 2
//#define NO_SHADOWS
#endif
RaytracingAccelerationStructure Scene : register(t0, space0);
#endif //__DXR_GLOBAL_HLSL__
================================================
FILE: resources/shaders/dxr_pathtracer_accumulation.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_PATHTRACER_ACCUMULATION_HLSL__
#define __DXR_PATHTRACER_ACCUMULATION_HLSL__
#include "pp_util.hlsl"
#include "pp_hdr_util.hlsl"
Texture2D<float4> input : register(t0);
RWTexture2D<float4> output : register(u0);
SamplerState s0 : register(s0);
cbuffer Properties : register(b0)
{
float frame_idx;
};
[numthreads(16, 16, 1)]
void main(uint3 DTid : SV_DispatchThreadID)
{
float4 current = input[DTid.xy]; // Last path tracer result
float4 prev = output[DTid.xy]; // Previous path tracer output
float accum_count = frame_idx; // 0 to x, the number of times the accumulation has ran.
float4 color = (accum_count * prev + current) / (accum_count + 1); // accumulate
output[DTid.xy] = color; // update the output with the accumulated result.
}
#endif //__DXR_PATHTRACER_ACCUMULATION_HLSL__
================================================
FILE: resources/shaders/dxr_pathtracer_entries.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_PATHTRACER_ENTRIES_HLSL__
#define __DXR_PATHTRACER_ENTRIES_HLSL__
#include "dxr_shadow_entries.hlsl"
//Reflections
[shader("closesthit")]
void ReflectionHit(inout PathTracingHitInfoCone payload, in Attributes attr)
{
// Calculate the essentials
const Offset offset = g_offsets[InstanceID()];
const Material material = g_materials[offset.material_idx];
const float3 hit_pos = HitWorldPosition();
const float index_offset = offset.idx_offset;
const float vertex_offset = offset.vertex_offset;
// Find first index location
const uint index_size = 4;
const uint indices_per_triangle = 3;
const uint triangle_idx_stride = indices_per_triangle * index_size;
uint base_idx = PrimitiveIndex() * triangle_idx_stride;
base_idx += index_offset * 4; // offset the start
uint3 indices = Load3x32BitIndices(g_indices, base_idx);
indices += float3(vertex_offset, vertex_offset, vertex_offset); // offset the start
// Gather triangle vertices
const Vertex v0 = g_vertices[indices.x];
const Vertex v1 = g_vertices[indices.y];
const Vertex v2 = g_vertices[indices.z];
// Variables
const float3 V = normalize(payload.origin - hit_pos);
// Calculate actual "fragment" attributes.
const float3 frag_pos = HitAttribute(v0.pos, v1.pos, v2.pos, attr);
const float3 normal = normalize(HitAttribute(v0.normal, v1.normal, v2.normal, attr));
const float3 tangent = HitAttribute(v0.tangent, v1.tangent, v2.tangent, attr);
const float3 bitangent = HitAttribute(v0.bitangent, v1.bitangent, v2.bitangent, attr);
float2 uv = HitAttribute(float3(v0.uv, 0), float3(v1.uv, 0), float3(v2.uv, 0), attr).xy;
uv.y = 1.0f - uv.y;
float mip_level = payload.depth + 1;
OutputMaterialData output_data = InterpretMaterialDataRT(material.data,
g_textures[material.albedo_id],
g_textures[material.normal_id],
g_textures[material.roughness_id],
g_textures[material.metalicness_id],
g_textures[material.emissive_id],
g_textures[material.ao_id],
mip_level,
s0,
uv);
float3 albedo = output_data.albedo;
float roughness = output_data.roughness;
float metal = output_data.metallic;
float3 emissive = output_data.emissive;
float ao = output_data.ao;
#ifdef NO_PATH_TRACED_NORMALS
float3 N = normalize(mul(ObjectToWorld3x4(), float4(normal, 0)));
float3 fN = N;
#else
float3 N = 0;
float3 fN = CalcPeturbedNormal(normal, output_data.normal, tangent, bitangent, V, N);
#endif
// #################### GGX #####################
nextRand(payload.seed);
payload.color = ggxIndirect(hit_pos, fN, N, V, albedo, metal, roughness, ao, payload.seed, payload.depth + 1, true, payload.cone);
payload.color += ggxDirect(hit_pos, fN, N, V, albedo, metal, roughness, payload.seed, payload.depth + 1);
payload.color += emissive;
}
//Reflection skybox
[shader("miss")]
void ReflectionMiss(inout PathTracingHitInfoCone payload)
{
payload.color = skybox.SampleLevel(s0, WorldRayDirection(), 0).rgb;
}
#endif //__DXR_PATHTRACER_ENTRIES_HLSL__
================================================
FILE: resources/shaders/dxr_pathtracer_functions.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_PATHTRACER_FUNCTIONS_HLSL__
#define __DXR_PATHTRACER_FUNCTIONS_HLSL__
#include "pbr_util.hlsl"
float3 TraceColorRay(float3 origin, float3 direction, unsigned int depth, unsigned int seed)
{
if (depth >= MAX_RECURSION)
{
return float3(0, 0, 0);
}
// Define a ray, consisting of origin, direction, and the min-max distance values
RayDesc ray;
ray.Origin = origin;
ray.Direction = direction;
ray.TMin = 0;
ray.TMax = 1.0e38f;
PathTracingHitInfo payload = { float3(1, 1, 1), seed, origin, depth };
// Trace the ray
TraceRay(
Scene,
RAY_FLAG_NONE,
~0, // InstanceInclusionMask
0, // RayContributionToHitGroupIndex
0, // MultiplierForGeometryContributionToHitGroupIndex
0, // miss shader index
ray,
payload);
return payload.color;
}
float3 TraceColorRayCone(float3 origin, float3 direction, unsigned int depth, unsigned int seed, RayCone cone)
{
if (depth >= MAX_RECURSION)
{
return float3(0, 0, 0);
}
// Define a ray, consisting of origin, direction, and the min-max distance values
RayDesc ray;
ray.Origin = origin;
ray.Direction = direction;
ray.TMin = 0;
ray.TMax = 1.0e38f;
PathTracingHitInfoCone payload = { float3(1, 1, 1), seed, origin, depth, cone };
// Trace the ray
TraceRay(
Scene,
RAY_FLAG_NONE,
~0, // InstanceInclusionMask
0, // RayContributionToHitGroupIndex
0, // MultiplierForGeometryContributionToHitGroupIndex
0, // miss shader index
ray,
payload);
return payload.color;
}
// NVIDIA's luminance function
inline float luminance(float3 rgb)
{
return dot(rgb, float3(0.2126f, 0.7152f, 0.0722f));
}
// NVIDIA's probability function
float probabilityToSampleDiffuse(float3 difColor, float3 specColor)
{
float lumDiffuse = max(0.01f, luminance(difColor.rgb));
float lumSpecular = max(0.01f, luminance(specColor.rgb));
return lumDiffuse / (lumDiffuse + lumSpecular);
}
static RayCone null_cone = { 0, 0 };
float3 ggxDirect(float3 hit_pos, float3 fN, float3 N, float3 V, float3 albedo, float metal, float roughness, unsigned int seed, unsigned int depth)
{
// #################### GGX #####################
uint light_count = lights[0].tid >> 2;
if (light_count < 1) return 0;
int light_to_sample = min(int(nextRand(seed) * light_count), light_count - 1);
Light light = lights[light_to_sample];
float3 L = 0;
float max_light_dist = 0;
float3 light_intensity = 0;
{
// Calculate light properties
uint tid = light.tid & 3;
//Light direction (constant with directional, position dependent with other)
L = (lerp(light.pos - hit_pos, light.dir, tid == light_type_directional));
float light_dist = length(L);
L /= light_dist;
//Spot intensity (only used with spot; but always calculated)
float min_cos = cos(light.ang);
float max_cos = lerp(min_cos, 1, 0.5f);
float cos_angle = dot(light.dir, L);
float spot_intensity = lerp(smoothstep(min_cos, max_cos, cos_angle), 1, tid != light_type_spot);
//Attenuation & spot intensity (only used with point or spot)
float attenuation = lerp(1.0f - smoothstep(0, light.rad, light_dist), 1, tid == light_type_directional);
light_intensity = (light.col * spot_intensity) * attenuation;
max_light_dist = lerp(light_dist, 100000, tid == light_type_directional);
}
float3 H = normalize(V + L);
// Shadow
float shadow_mult = float(light_count) * GetShadowFactor(hit_pos + (L * EPSILON), L, light.light_size, max_light_dist, MAX_SHADOW_SAMPLES, depth, CALLINGPASS_PATHTRACING, seed);
// Compute some dot products needed for shading
float NdotV = saturate(dot(fN, V));
float NdotL = saturate(dot(fN, L));
float NdotH = saturate(dot(fN, H));
float LdotH = saturate(dot(L, H));
// D = Normal distribution (Distribution of the microfacets)
float D = D_GGX(NdotH, max(0.05, roughness));
// G = Geometric shadowing term (Microfacets shadowing)
float G = G_SchlicksmithGGX(NdotL, NdotV, max(0.05, roughness));
// F = Fresnel factor (Reflectance depending on angle of incidence)
float3 F = F_Schlick(LdotH, metal, albedo);
//float3 F = F_ShlickSimple(metal, LdotH);
float3 kS = F_SchlickRoughness(NdotV, metal, albedo, roughness);
float3 kD = (1.f - kS) * (1.0 - metal);
float3 spec = (D * F * G) / (4.0 * NdotV * NdotL + 0.001f);
float3 lighting = (light_intensity * (NdotL * spec + NdotL * albedo / M_PI));
return (shadow_mult * lighting) * kD;
}
float3 ggxIndirect(float3 hit_pos, float3 fN, float3 N, float3 V, float3 albedo, float metal, float roughness, float ao, unsigned int seed, unsigned int depth, bool use_raycone = false, RayCone cone = null_cone)
{
// #################### GGX #####################
float diffuse_probability = probabilityToSampleDiffuse(albedo, metal);
float choose_diffuse = (nextRand(seed) < diffuse_probability);
// Diffuse lobe
if (choose_diffuse)
{
float3 color = (albedo / diffuse_probability) * ao;
#ifdef RUSSIAN_ROULETTE
// ############## RUSSIAN ROULETTE ###############
// Russian Roulette
// Randomly terminate a path with a probability inversely equal to the throughput
float p = max(color.x, max(color.y, color.z));
// Add the energy we 'lose' by randomly terminating paths
color *= 1 / p;
if (nextRand(seed) > p) {
return 0;
}
#endif
// ##### BOUNCE #####
nextRand(seed);
const float3 rand_dir = getCosHemisphereSample(seed, N);
float3 irradiance = 0;
if (use_raycone)
{
irradiance = TraceColorRayCone(hit_pos + (EPSILON * N), rand_dir, depth, seed, cone);
}
else
{
irradiance = TraceColorRay(hit_pos + (EPSILON * N), rand_dir, depth, seed);
}
if (dot(N, rand_dir) <= 0.0f) irradiance = float3(0, 0, 0);
float3 kS = F_SchlickRoughness(max(dot(fN, V), 0.0f), metal, albedo, roughness);
float3 kD = 1.0f - kS;
kD *= 1.0f - metal;
return kD * (irradiance * color);
}
else
{
nextRand(seed);
float3 H = getGGXMicrofacet(seed, roughness, N);
// ### BRDF ###
float3 L = normalize(2.f * dot(V, H) * H - V);
// Compute some dot products needed for shading
float NdotV = saturate(dot(N, V));
float NdotL = saturate(dot(N, L));
float NdotH = saturate(dot(N, H));
float LdotH = saturate(dot(L, H));
// D = Normal distribution (Distribution of the microfacets)
float D = D_GGX(NdotH, max(0.05, roughness));
// G = Geometric shadowing term (Microfacets shadowing)
float G = G_SchlicksmithGGX(NdotL, NdotV, max(0.05, roughness));
// F = Fresnel factor (Reflectance depending on angle of incidence)
float3 F = F_Schlick(NdotH, metal, albedo);
float3 spec = (D * F * G) / ((4.0 * NdotL * NdotV + 0.001f));
float ggx_probability = D * NdotH / (4 * LdotH);
float3 color = (NdotL * spec / (ggx_probability * (1.0f - diffuse_probability)));
#ifdef RUSSIAN_ROULETTE
// ############## RUSSIAN ROULETTE ###############
// Russian Roulette
// Randomly terminate a path with a probability inversely equal to the throughput
float p = max(color.x, max(color.y, color.z));
// Add the energy we 'lose' by randomly terminating paths
color *= 1 / p;
if (nextRand(seed) > p) {
return 0;
}
#endif
// #### BOUNCE ####
float3 irradiance = 0;
if (use_raycone)
{
irradiance = TraceColorRayCone(hit_pos + (EPSILON * N), L, depth, seed, cone);
}
else
{
irradiance = TraceColorRay(hit_pos + (EPSILON * N), L, depth, seed);
}
if (dot(N, L) <= 0.0f) irradiance = float3(0, 0, 0);
return color * irradiance;
}
}
#endif //__DXR_PATHTRACER_FUNCTIONS_HLSL__
================================================
FILE: resources/shaders/dxr_pathtracer_main.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_PATHTRACER_MAIN_HLSL__
#define __DXR_PATHTRACER_MAIN_HLSL__
#define LIGHTS_REGISTER register(t2)
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
#include "material_util.hlsl"
#include "lighting.hlsl"
#include "dxr_texture_lod.hlsl"
// Definitions for:
// - Vertex, Material, Offset
// - Ray, RayCone, ReflectionHitInfo, etc
#include "dxr_structs.hlsl"
// Definitions for:
// - HitWorldPosition, Load3x32BitIndices, unpack_position, HitAttribute
#include "dxr_functions.hlsl"
RWTexture2D<float4> output : register(u0); // xyz: reflection, a: shadow factor
ByteAddressBuffer g_indices : register(t1);
StructuredBuffer<Vertex> g_vertices : register(t3);
StructuredBuffer<Material> g_materials : register(t4);
StructuredBuffer<Offset> g_offsets : register(t5);
Texture2D g_textures[1000] : register(t10);
Texture2D gbuffer_albedo : register(t1010);
Texture2D gbuffer_normal : register(t1011);
Texture2D gbuffer_emissive : register(t1012);
Texture2D gbuffer_depth : register(t1013);
TextureCube skybox : register(t6);
TextureCube irradiance_map : register(t9);
SamplerState s0 : register(s0);
typedef BuiltInTriangleIntersectionAttributes Attributes;
cbuffer CameraProperties : register(b0)
{
float4x4 inv_view;
float4x4 inv_projection;
float4x4 inv_vp;
float frame_idx;
float3 padding;
};
#include "dxr_pathtracer_functions.hlsl"
#include "dxr_pathtracer_entries.hlsl"
[shader("raygeneration")]
void RaygenEntry()
{
uint rand_seed = initRand((DispatchRaysIndex().x + DispatchRaysIndex().y * DispatchRaysDimensions().x), frame_idx);
// Texture UV coordinates [0, 1]
float2 uv = float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy - 1);
// Screen coordinates [0, resolution] (inverted y)
int2 screen_co = DispatchRaysIndex().xy;
// Get g-buffer information
float4 albedo_roughness = gbuffer_albedo[screen_co];
float4 normal_metallic = gbuffer_normal[screen_co];
float4 emissive_ao = gbuffer_emissive[screen_co];
// Unpack G-Buffer
float depth = gbuffer_depth[screen_co].x;
float3 albedo = albedo_roughness.rgb;
float3 wpos = unpack_position(float2(uv.x, 1.f - uv.y), depth, inv_vp);
float3 normal = normalize(normal_metallic.xyz);
float metallic = normal_metallic.w;
float roughness = albedo_roughness.w;
float3 emissive = emissive_ao.xyz;
float ao = emissive_ao.w;
// Do lighting
float3 cpos = float3(inv_view[0][3], inv_view[1][3], inv_view[2][3]);
float3 V = normalize(cpos - wpos);
float3 result = float3(0, 0, 0);
SurfaceHit sfhit;
sfhit.pos = wpos;
sfhit.normal = normal;
sfhit.dist = length(cpos - wpos);
sfhit.surface_spread_angle = ComputeSurfaceSpreadAngle(gbuffer_depth, gbuffer_normal, inv_vp, wpos, normal);
// Compute the initial ray cone from the gbuffers.
RayCone cone = ComputeRayConeFromGBuffer(sfhit, 1.39626, DispatchRaysDimensions().y);
nextRand(rand_seed);
const float3 rand_dir = getCosHemisphereSample(rand_seed, normal);
const float cos_theta = cos(dot(rand_dir, normal));
result = TraceColorRayCone(wpos + (EPSILON * normal), rand_dir, 0, rand_seed, cone);
if (any(isnan(result)))
{
result = 0;
}
result = clamp(result, 0, 100);
output[DispatchRaysIndex().xy] = float4(result, 1);
}
#endif //__DXR_PATHTRACER_MAIN_HLSL__
================================================
FILE: resources/shaders/dxr_raytracing.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_RAYTRACING_HLSL__
#define __DXR_RAYTRACING_HLSL__
#define LIGHTS_REGISTER register(t2)
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
#include "lighting.hlsl"
#include "material_util.hlsl"
// Definitions for:
// - Vertex, Material, Offset
// - Ray, RayCone, ReflectionHitInfo
#include "dxr_structs.hlsl"
// Definitions for:
// - HitWorldPosition, Load3x32BitIndices, unpack_position, HitAttribute
#include "dxr_functions.hlsl"
RWTexture2D<float4> gOutput : register(u0);
ByteAddressBuffer g_indices : register(t1);
StructuredBuffer<Vertex> g_vertices : register(t3);
StructuredBuffer<Material> g_materials : register(t4);
StructuredBuffer<Offset> g_offsets : register(t5);
TextureCube skybox : register(t6);
Texture2D brdf_lut : register(t7);
TextureCube irradiance_map : register(t8);
Texture2D g_textures[1000] : register(t9);
SamplerState s0 : register(s0);
SamplerState point_sampler : register(s1);
typedef BuiltInTriangleIntersectionAttributes MyAttributes;
#include "dxr_pathtracer_functions.hlsl"
cbuffer CameraProperties : register(b0)
{
float4x4 view;
float4x4 inv_projection_view;
float3 camera_position;
float padding;
float focal_radius;
float focal_len;
float frame_idx;
float intensity;
};
inline Ray GenerateCameraRay(uint2 index, in float3 cameraPosition, in float4x4 projectionToWorld, in float2 offset, unsigned int seed)
{
#ifdef DEPTH_OF_FIELD
float2 pixelOff = float2(nextRand(seed), nextRand(seed)); // Random offset in pixel to reduce floating point error.
float3 cameraU = float3(1, 0, 0);
float3 cameraV = float3(0, 1, 0);
float3 cameraW = float3(0, 0, 1);
float2 xy = (index + offset + pixelOff) + 0.5f; // center in the middle of the pixel.
float2 screenPos = xy / DispatchRaysDimensions().xy;
// Invert Y for DirectX-style coordinates.
screenPos.y = -screenPos.y;
// Unproject the pixel coordinate into a world positon.
float4 world = mul(float4(screenPos, 0, 1), projectionToWorld);
world.xyz = world.x * cameraU + world.y * cameraV + cameraW;
world.xyz /= 1;
float2 pixelCenter = (index + offset) / DispatchRaysDimensions().xy; // Pixel ID -> [0..1] over screen
float2 ndc = float2(2, -2) * pixelCenter + float2(-1, 1); // Convert to [-1..1]
float3 rayDir = ndc.x * cameraU + ndc.y * cameraV + cameraW; // Ray to point on near plane
rayDir /= 1;
float focallen = focal_len;
float lensrad = focal_len / (2.0f * 16);
float3 focalPt = cameraPosition + focallen * world;
float2 rngLens = float2(6.2831853f * nextRand(seed), lensrad * nextRand(seed));
float2 lensPos = float2(cos(rngLens.x) * rngLens.y, sin(rngLens.x) * rngLens.y);
//lensPos = mul(float4(lensPos, 0, 0), projectionToWorld);
Ray ray;
ray.origin = cameraPosition + float3(lensPos, 0);
ray.direction = normalize(focalPt.xyz - ray.origin);
#else
float2 xy = (index + offset) + 0.5f; // center in the middle of the pixel.
float2 screenPos = xy / DispatchRaysDimensions().xy * 2.0 - 1.0;
// Invert Y for DirectX-style coordinates.
screenPos.y = -screenPos.y;
// Unproject the pixel coordinate into a world positon.
float4 world = mul(float4(screenPos, 0, 1), projectionToWorld);
world.xyz /= world.w;
Ray ray;
ray.origin = cameraPosition;
ray.direction = normalize(world.xyz - ray.origin);
return ray;
#endif
}
[shader("raygeneration")]
void RaygenEntry()
{
uint rand_seed = initRand(DispatchRaysIndex().x + DispatchRaysIndex().y * DispatchRaysDimensions().x, frame_idx);
#ifdef FOUR_X_AA
Ray a = GenerateCameraRay(DispatchRaysIndex().xy, camera_position, inv_projection_view, float2(0.5, 0), rand_seed);
Ray b = GenerateCameraRay(DispatchRaysIndex().xy, camera_position, inv_projection_view, float2(-0.5, 0), rand_seed);
Ray c = GenerateCameraRay(DispatchRaysIndex().xy, camera_position, inv_projection_view, float2(0.0, 0.5), rand_seed);
Ray d = GenerateCameraRay(DispatchRaysIndex().xy, camera_position, inv_projection_view, float2(0.0, -0.5), rand_seed);
float3 result_a = TraceColorRay(a.origin, a.direction, 0, rand_seed);
nextRand(rand_seed);
float3 result_b = TraceColorRay(b.origin, b.direction, 0, rand_seed);
nextRand(rand_seed);
float3 result_c = TraceColorRay(c.origin, c.direction, 0, rand_seed);
nextRand(rand_seed);
float3 result_d = TraceColorRay(d.origin, d.direction, 0, rand_seed);
float3 result = (result_a + result_b + result_c + result_d) / 4;
#else
Ray ray = GenerateCameraRay(DispatchRaysIndex().xy, camera_position, inv_projection_view, float2(0, 0), rand_seed);
float3 result = TraceColorRay(ray.origin, ray.direction, 0, rand_seed);
#endif
if (any(isnan(result)))
{
result = float3(1000, 0, 0);
}
float4 prev = gOutput[DispatchRaysIndex().xy];
float4 color = (frame_idx * prev + float4(result, 1)) / (frame_idx + 1); // accumulate
gOutput[DispatchRaysIndex().xy] = color;
}
[shader("miss")]
void MissEntry(inout FullRTHitInfo payload)
{
payload.color = skybox.SampleLevel(s0, WorldRayDirection(), 0).rgb;
}
[shader("closesthit")]
void ClosestHitEntry(inout FullRTHitInfo payload, in MyAttributes attr)
{
// Calculate the essentials
const Offset offset = g_offsets[InstanceID()];
const Material material = g_materials[offset.material_idx];
const float3 hit_pos = HitWorldPosition();
const float index_offset = offset.idx_offset;
const float vertex_offset = offset.vertex_offset;
// Find first index location
const uint index_size = 4;
const uint indices_per_triangle = 3;
const uint triangle_idx_stride = indices_per_triangle * index_size;
uint base_idx = PrimitiveIndex() * triangle_idx_stride;
base_idx += index_offset * 4; // offset the start
uint3 indices = Load3x32BitIndices(g_indices, base_idx);
indices += float3(vertex_offset, vertex_offset, vertex_offset); // offset the start
// Gather triangle vertices
const Vertex v0 = g_vertices[indices.x];
const Vertex v1 = g_vertices[indices.y];
const Vertex v2 = g_vertices[indices.z];
// Variables
const float3 V = normalize(payload.origin - hit_pos);
// Calculate actual "fragment" attributes.
const float3 frag_pos = HitAttribute(v0.pos, v1.pos, v2.pos, attr);
const float3 normal = normalize(HitAttribute(v0.normal, v1.normal, v2.normal, attr));
const float3 tangent = HitAttribute(v0.tangent, v1.tangent, v2.tangent, attr);
const float3 bitangent = HitAttribute(v0.bitangent, v1.bitangent, v2.bitangent, attr);
float2 uv = HitAttribute(float3(v0.uv, 0), float3(v1.uv, 0), float3(v2.uv, 0), attr).xy;
uv.y = 1.0f - uv.y;
float mip_level = payload.depth;
OutputMaterialData output_data = InterpretMaterialDataRT(material.data,
g_textures[material.albedo_id],
g_textures[material.normal_id],
g_textures[material.roughness_id],
g_textures[material.metalicness_id],
g_textures[material.emissive_id],
g_textures[material.ao_id],
mip_level,
s0,
uv);
float3 albedo = output_data.albedo;
float roughness = output_data.roughness;
float metal = output_data.metallic;
float3 emissive = output_data.emissive;
float ao = output_data.ao;
float3 N = 0;
float3 fN = 0;
if (payload.depth > 0)
{
N = normalize(mul(ObjectToWorld3x4(), float4(normal, 0)));
fN = N;
}
else
{
N = 0;
fN = CalcPeturbedNormal(normal, output_data.normal, tangent, bitangent, V, N);
}
nextRand(payload.seed);
payload.color = ggxIndirect(hit_pos, fN, N, V, albedo, metal, roughness, ao, payload.seed, payload.depth + 1);
payload.color += ggxDirect(hit_pos, fN, N, V, albedo, metal, roughness, payload.seed, payload.depth + 1);
payload.color += emissive;
}
[shader("closesthit")]
void ShadowClosestHitEntry(inout ShadowHitInfo hit, MyAttributes bary)
{
hit.is_hit = true;
}
[shader("miss")]
void ShadowMissEntry(inout ShadowHitInfo hit : SV_RayPayload)
{
hit.is_hit = false;
}
#endif //__DXR_RAYTRACING_HLSL__
================================================
FILE: resources/shaders/dxr_reflection_entries.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_REFLECTION_ENTRIES_HLSL__
#define __DXR_REFLECTION_ENTRIES_HLSL__
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
#include "material_util.hlsl"
#include "lighting.hlsl"
#include "dxr_texture_lod.hlsl"
// Definitions for:
// - Vertex, Material, Offset
// - Ray, RayCone, ReflectionHitInfo
#include "dxr_structs.hlsl"
// Definitions for:
// - HitWorldPosition, Load3x32BitIndices, unpack_position, HitAttribute
#include "dxr_functions.hlsl"
//Reflections
[shader("closesthit")]
void ReflectionHit(inout ReflectionHitInfo payload, in Attributes attr)
{
// Calculate the essentials
const Offset offset = g_offsets[InstanceID()];
const Material material = g_materials[offset.material_idx];
const float3 hit_pos = HitWorldPosition();
const float index_offset = offset.idx_offset;
const float vertex_offset = offset.vertex_offset;
const float3x4 model_matrix = ObjectToWorld3x4();
// Find first index location
const uint index_size = 4;
const uint indices_per_triangle = 3;
const uint triangle_idx_stride = indices_per_triangle * index_size;
uint base_idx = PrimitiveIndex() * triangle_idx_stride;
base_idx += index_offset * 4; // offset the start
uint3 indices = Load3x32BitIndices(g_indices, base_idx);
indices += float3(vertex_offset, vertex_offset, vertex_offset); // offset the start
// Gather triangle vertices
const Vertex v0 = g_vertices[indices.x];
const Vertex v1 = g_vertices[indices.y];
const Vertex v2 = g_vertices[indices.z];
//Direction & position
float3 V = normalize(payload.origin - hit_pos);
//Normal mapping
const float3 frag_pos = HitAttribute(v0.pos, v1.pos, v2.pos, attr);
float3 normal = normalize(HitAttribute(v0.normal, v1.normal, v2.normal, attr));
float3 tangent = HitAttribute(v0.tangent, v1.tangent, v2.tangent, attr);
float3 bitangent = HitAttribute(v0.bitangent, v1.bitangent, v2.bitangent, attr);
//Get data from VBO
float2 uv = HitAttribute(float3(v0.uv, 0), float3(v1.uv, 0), float3(v2.uv, 0), attr).xy;
uv.y = 1.0f - uv.y;
// Propogate the ray cone
payload.cone = Propagate(payload.cone, 0, length(payload.origin - hit_pos));
// Calculate the texture LOD level
// float mip_level = ComputeTextureLOD(
// payload.cone,
// V,
// normalize(mul(model_matrix, float4(normal, 0))),
// mul(model_matrix, float4(v0.pos, 1)),
// mul(model_matrix, float4(v1.pos, 1)),
// mul(model_matrix, float4(v2.pos, 1)),
// v0.uv,
// v1.uv,
// v2.uv,
// g_textures[material.albedo_id]);
//TODO: Fixme
float mip_level = 0;
OutputMaterialData output_data = InterpretMaterialDataRT(material.data,
g_textures[material.albedo_id],
g_textures[material.normal_id],
g_textures[material.roughness_id],
g_textures[material.metalicness_id],
g_textures[material.emissive_id],
g_textures[material.ao_id],
mip_level,
s0,
uv);
float3 albedo = output_data.albedo;
float roughness = output_data.roughness;
float metal = output_data.metallic;
float3 emissive = output_data.emissive;
float ao = output_data.ao;
// Normals
float3 fN = CalcPeturbedNormal(normal, output_data.normal, tangent, bitangent, V);
float3 flipped_N = fN * -1;
const float3 sampled_irradiance = irradiance_map.SampleLevel(s0, flipped_N, 0).xyz;
// TODO: reflections in reflections
const float3 F = F_SchlickRoughness(max(dot(fN, V), 0.0), metal, albedo, roughness);
float3 kS = F;
float3 kD = 1.0 - kS;
kD *= 1.0 - metal;
const float2 sampled_brdf = brdf_lut.SampleLevel(s0, float2(max(dot(fN, V), 0.01f), roughness), 0).rg;
//Reflection in reflections
float4 dir_t = float4(0, 0, 0, 0);
float3 reflection = DoReflection(hit_pos, V, fN, payload.seed, payload.depth + 1, roughness, metal, payload.cone, dir_t).xyz;
//Lighting
#undef SOFT_SHADOWS
float3 lighting = shade_pixel(hit_pos, V, albedo, metal, roughness, emissive, fN, payload.seed, shadow_sample_count, payload.depth + 1, CALLINGPASS_REFLECTIONS);
#define SOFT_SHADOWS
float3 specular = reflection * (kS * sampled_brdf.x + sampled_brdf.y);
float3 diffuse = albedo * sampled_irradiance;
float3 ambient = (kD * diffuse + specular) * ao;
// Output the final reflections here
payload.color = ambient + lighting;
payload.hit_t = RayTCurrent();
}
//Reflection skybox
[shader("miss")]
void ReflectionMiss(inout ReflectionHitInfo payload)
{
payload.color = skybox.SampleLevel(s0, WorldRayDirection(), 0);
payload.hit_t = RayTCurrent();
}
#endif //__DXR_REFLECTION_ENTRIES_HLSL__
================================================
FILE: resources/shaders/dxr_reflection_functions.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_REFLECTION_FUNCTIONS_HLSL__
#define __DXR_REFLECTION_FUNCTIONS_HLSL__
#include "dxr_global.hlsl"
#include "dxr_structs.hlsl"
// Definitions for:
// - Vertex, Material, Offset
// - Ray, RayCone, ReflectionHitInfo
#include "dxr_structs.hlsl"
// Definitions for:
// - HitWorldPosition, Load3x32BitIndices, unpack_position, HitAttribute
#include "dxr_functions.hlsl"
#include "pbr_util.hlsl"
float3 TraceReflectionRay(float3 origin, float3 norm, float3 direction, uint rand_seed, uint depth, RayCone cone, inout float4 dir_t)
{
if (depth >= MAX_RECURSION)
{
return skybox.SampleLevel(s0, direction, 0).rgb;
}
origin += norm * EPSILON;
ReflectionHitInfo payload = {origin, float3(0,0,1), rand_seed, depth, 0, cone};
// Define a ray, consisting of origin, direction, and the min-max distance values
RayDesc ray;
ray.Origin = origin;
ray.Direction = direction;
ray.TMin = 0;
ray.TMax = 10000.0;
bool nan = isnan(origin.x) == true || isnan(origin.y) == true || isnan(origin.z) == true;
nan = nan || isnan(direction.x) == true || isnan(direction.y) == true || isnan(direction.z) == true;
if(nan)
{
return skybox.SampleLevel(s0, direction, 0).rgb;
}
// Trace the ray
TraceRay(
Scene,
RAY_FLAG_NONE,
//RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH
//RAY_FLAG_CULL_BACK_FACING_TRIANGLES,
0xFF, // InstanceInclusionMask
0, // RayContributionToHitGroupIndex
1, // MultiplierForGeometryContributionToHitGroupIndex
0, // miss shader index
ray,
payload);
dir_t = float4(direction, payload.hit_t);
return payload.color;
}
float4 DoReflection(float3 wpos, float3 V, float3 N, uint rand_seed, uint depth, float roughness, float metallic, RayCone cone, inout float4 dir_t)
{
// Calculate ray info
float3 reflected = reflect(-V, N);
// Shoot an importance sampled ray
#ifndef PERFECT_MIRROR_REFLECTIONS
// Shoot perfect mirror ray if enabled or if it's a recursion or it's almost a perfect mirror
if (depth > 0 || roughness < 0.05f)
return float4(TraceReflectionRay(wpos, N, reflected, rand_seed, depth, cone, dir_t), 1);
#ifdef GROUND_TRUTH_REFLECTIONS
float3 reflection = float3(0.f, 0.f, 0.f);
float weight_sum = 0.f;
float sampled_count = 0.f;
float pdf_weight = 0.f; /* Used for further weighting by spatial reconstruction */
float3 total_hit = float3(0.f, 0.f, 0.f);
//[unroll]
for (uint i = 0; i < max(MAX_GT_REFLECTION_SAMPLES * metallic, 2); ++i) {
nextRand(rand_seed);
float2 xi = hammersley2d(rand_seed, 8192);
float pdf = 0.f;
float3 H = importanceSamplePdf(xi, roughness, N, pdf);
float3 L = reflect(-V, H);
float NdotL = max(dot(N, L), 0.f);
if (NdotL <= 0.f) {
nextRand(rand_seed);
xi = hammersley2d(rand_seed, 8192);
H = importanceSamplePdf(xi, roughness, N, pdf);
L = reflect(-V, H);
NdotL = max(dot(N, L), 0.f);
}
if (NdotL >= 0.f) {
float weight = brdf_weight(V, L, N, roughness) / pdf;
float4 ray_dir_t = float4(0.f, 0.f, 0.f, 0.f);
reflection += TraceReflectionRay(wpos, N, L, rand_seed, depth, cone, ray_dir_t) * weight;
weight_sum += weight;
pdf_weight += pdf;
total_hit += ray_dir_t.xyz * ray_dir_t.w;
++sampled_count;
}
}
total_hit /= sampled_count;
dir_t = float4(normalize(total_hit), length(total_hit));
return float4(reflection / weight_sum, pdf_weight / sampled_count);
#else
//Calculate an importance sampled ray
nextRand(rand_seed);
float2 xi = hammersley2d(rand_seed, 8192);
float pdf = 0;
float3 H = importanceSamplePdf(xi, roughness, N, pdf);
float3 L = reflect(-V, H);
float NdotL = max(dot(N, L), 0.f);
if(NdotL <= 0.f)
{
nextRand(rand_seed);
xi = hammersley2d(rand_seed, 8192);
H = importanceSamplePdf(xi, roughness, N, pdf);
L = reflect(-V, H);
NdotL = max(dot(N, L), 0.f);
}
float3 reflection = float3(0.f, 0.f, 0.f);
if (NdotL >= 0.f)
{
reflection = TraceReflectionRay(wpos, N, L, rand_seed, depth, cone, dir_t);
}
#ifndef DISABLE_SPATIAL_RECONSTRUCTION
return float4(reflection, pdf);
#else
return float4(reflection, -1.f);
#endif
#endif
#else
// Shoot perfect mirror ray if enabled or if it's a recursion or it's almost a perfect mirror
return float4(TraceReflectionRay(wpos, N, reflected, rand_seed, depth, cone, dir_t), -1.f);
#endif
}
#endif //__DXR_REFLECTION_FUNCTIONS_HLSL__
================================================
FILE: resources/shaders/dxr_reflection_main.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_REFLECTION_MAIN_HLSL__
#define __DXR_REFLECTION_MAIN_HLSL__
#define LIGHTS_REGISTER register(t2)
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
#include "material_util.hlsl"
#include "lighting.hlsl"
#include "dxr_texture_lod.hlsl"
// Definitions for:
// - Vertex, Material, Offset
// - Ray, RayCone, ReflectionHitInfo
#include "dxr_structs.hlsl"
// Definitions for:
// - HitWorldPosition, Load3x32BitIndices, unpack_position, HitAttribute
#include "dxr_functions.hlsl"
RWTexture2D<float4> output_reflection : register(u0); // rgb: reflection, a: pdf
RWTexture2D<unorm float> output_shadow : register(u1); // r: shadow factor
RWTexture2D<float4> output_dir_t_buffer : register(u2); // xyz: direction, w: hitT; dirT to calculate hit position
ByteAddressBuffer g_indices : register(t1);
StructuredBuffer<Vertex> g_vertices : register(t3);
StructuredBuffer<Material> g_materials : register(t4);
StructuredBuffer<Offset> g_offsets : register(t5);
Texture2D g_textures[1000] : register(t10);
Texture2D gbuffer_albedo : register(t1010);
Texture2D gbuffer_normal : register(t1011);
Texture2D gbuffer_depth : register(t1012);
TextureCube skybox : register(t6);
Texture2D brdf_lut : register(t8);
TextureCube irradiance_map : register(t9);
SamplerState s0 : register(s0);
typedef BuiltInTriangleIntersectionAttributes Attributes;
cbuffer CameraProperties : register(b0)
{
float4x4 inv_view;
float4x4 inv_projection;
float4x4 inv_vp;
float frame_idx;
float intensity;
float epsilon;
unsigned int shadow_sample_count;
};
#include "dxr_reflection_functions.hlsl"
#include "dxr_reflection_entries.hlsl"
#include "dxr_shadow_entries.hlsl"
[shader("raygeneration")]
void ReflectionRaygenEntry()
{
uint rand_seed = initRand(DispatchRaysIndex().x + DispatchRaysIndex().y * DispatchRaysDimensions().x, frame_idx);
// Texture UV coordinates [0, 1]
float2 uv = float2(DispatchRaysIndex().xy + 0.5) / float2(DispatchRaysDimensions().xy);
// Screen coordinates [0, resolution] (inverted y)
int2 screen_co = DispatchRaysIndex().xy;
// Get g-buffer information
float4 albedo_roughness = gbuffer_albedo.SampleLevel(s0, uv, 0);
float4 normal_metallic = gbuffer_normal.SampleLevel(s0, uv, 0);
// Unpack G-Buffer
float depth = gbuffer_depth.SampleLevel(s0, uv, 0).x;
float3 wpos = unpack_position(float2(uv.x, 1.f - uv.y), depth, inv_vp);
float3 albedo = albedo_roughness.rgb;
float roughness = albedo_roughness.w;
float3 normal = normal_metallic.xyz;
float metallic = normal_metallic.w;
// Do lighting
float3 cpos = float3(inv_view[0][3], inv_view[1][3], inv_view[2][3]);
float3 V = normalize(cpos - wpos);
if (length(normal) == 0) //TODO: Could be optimized by only marking pixels that need lighting, but that would require execute rays indirect
{
// A value of 1 in the output buffer, means that there is shadow
// So, the far plane pixels are set to 0
output_reflection[screen_co] = float4(0, 0, 0, 0);
output_shadow[screen_co] = 0;
output_dir_t_buffer[screen_co] = float4(0, 0, 0, 0);
return;
}
normal = lerp(normal, -normal, dot(normal, V) < 0);
// Describe the surface for mip level generation
SurfaceHit sfhit;
sfhit.pos = wpos;
sfhit.normal = normal;
sfhit.dist = length(cpos - wpos);
sfhit.surface_spread_angle = ComputeSurfaceSpreadAngle(gbuffer_depth, gbuffer_normal, inv_vp, wpos, normal);
// Compute the initial ray cone from the gbuffers.
RayCone cone = ComputeRayConeFromGBuffer(sfhit, 1.39626, DispatchRaysDimensions().y);
// Get reflection result
float4 dir_t = float4(0, 0, 0, 0);
float4 reflection_result = min(DoReflection(wpos, V, normal, rand_seed, 0, roughness, metallic, cone, dir_t), 10000);
// xyz: reflection, a: shadow factor
output_reflection[screen_co] = reflection_result;
output_dir_t_buffer[screen_co] = dir_t;
}
#endif //__DXR_REFLECTION_MAIN_HLSL__
================================================
FILE: resources/shaders/dxr_shadow_entries.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_SHADOW_ENTRIES_HLSL__
#define __DXR_SHADOW_ENTRIES_HLSL__
#include "pbr_util.hlsl"
#include "material_util.hlsl"
// Definitions for:
// - Vertex, Material, Offset
// - Ray, RayCone, ReflectionHitInfo
#include "dxr_structs.hlsl"
[shader("closesthit")]
void ShadowClosestHitEntry(inout ShadowHitInfo hit, Attributes bary)
{
hit.is_hit = true;
}
[shader("miss")]
void ShadowMissEntry(inout ShadowHitInfo hit : SV_RayPayload)
{
hit.is_hit = false;
}
#endif //__DXR_SHADOW_ENTRIES_HLSL__
================================================
FILE: resources/shaders/dxr_shadow_functions.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_SHADOWS_FUNCTIONS__
#define __DXR_SHADOWS_FUNCTIONS__
#include "dxr_global.hlsl"
#include "dxr_structs.hlsl"
bool TraceShadowRay(float3 origin, float3 direction, float far, uint calling_pass, unsigned int depth)
{
if (depth >= MAX_RECURSION)
{
return false;
}
// Define a ray, consisting of origin, direction, and the min-max distance values
RayDesc ray;
ray.Origin = origin;
ray.Direction = direction;
ray.TMin = 0;
ray.TMax = far;
ShadowHitInfo payload = { false, 0 };
uint ray_contr_idx = 1;
uint miss_idx = 1;
if (calling_pass == CALLINGPASS_SHADOWS)
{
ray_contr_idx = 0;
miss_idx = 0;
}
// Trace the ray
TraceRay(
Scene,
RAY_FLAG_NONE,
~0, // InstanceInclusionMask
ray_contr_idx, // RayContributionToHitGroupIndex
0, // MultiplierForGeometryContributionToHitGroupIndex
miss_idx, // miss shader index is set to idx but can probably be anything.
ray,
payload);
return payload.is_hit;
}
// Get shadow factor
float GetShadowFactor(float3 wpos, float3 light_dir, float light_size, float t_max, uint sample_count, uint depth, uint calling_pass, inout uint rand_seed)
{
float shadow_factor = 0.0f;
#ifdef SOFT_SHADOWS
for (uint i = 0; i < sample_count; ++i)
{
//float3 offset = normalize(float3(nextRand(rand_seed), nextRand(rand_seed), nextRand(rand_seed))) - 0.5;
float3 dir = perturbDirectionVector(rand_seed, light_dir, light_size);
float3 ray_direction = normalize(dir);
bool shadow = TraceShadowRay(wpos, ray_direction, t_max, calling_pass, depth);
shadow_factor += lerp(1.0, 0.0, shadow);
}
shadow_factor /= float(sample_count);
#else //SOFT_SHADOWS
bool shadow = TraceShadowRay(wpos, light_dir, t_max, calling_pass, depth);
shadow_factor = !shadow;
#endif //SOFT_SHADOWS
return shadow_factor;
}
#endif //__DXR_SHADOWS_FUNCTIONS__
================================================
FILE: resources/shaders/dxr_shadow_main.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_SHADOW_MAIN_HLSL__
#define __DXR_SHADOW_MAIN_HLSL__
#define LIGHTS_REGISTER register(t2)
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
#include "math.hlsl"
#include "material_util.hlsl"
#include "lighting.hlsl"
#include "dxr_texture_lod.hlsl"
#include "dxr_global.hlsl"
// Definitions for:
// - Vertex, Material, Offset
// - Ray, RayCone, ReflectionHitInfo
#include "dxr_structs.hlsl"
// Definitions for:
// - HitWorldPosition, Load3x32BitIndices, unpack_position, HitAttribute
#include "dxr_functions.hlsl"
RWTexture2D<float4> output_refl_shadow : register(u0); // xyz: reflection, a: shadow factor
ByteAddressBuffer g_indices : register(t1);
StructuredBuffer<Vertex> g_vertices : register(t3);
StructuredBuffer<Material> g_materials : register(t4);
StructuredBuffer<Offset> g_offsets : register(t5);
Texture2D g_textures[1000] : register(t10);
Texture2D gbuffer_albedo : register(t1010);
Texture2D gbuffer_normal : register(t1011);
Texture2D gbuffer_depth : register(t1012);
TextureCube skybox : register(t6);
Texture2D brdf_lut : register(t8);
TextureCube irradiance_map : register(t9);
SamplerState s0 : register(s0);
typedef BuiltInTriangleIntersectionAttributes Attributes;
cbuffer CameraProperties : register(b0)
{
float4x4 inv_view;
float4x4 inv_projection;
float4x4 inv_vp;
float frame_idx;
float intensity;
float epsilon;
unsigned int shadow_sample_count;
};
#include "dxr_shadow_functions.hlsl"
#include "dxr_shadow_entries.hlsl"
[shader("raygeneration")]
void ShadowRaygenEntry()
{
uint rand_seed = initRand(DispatchRaysIndex().x + DispatchRaysIndex().y * DispatchRaysDimensions().x, frame_idx);
// Texture UV coordinates [0, 1]
float2 uv = float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy - 1);
// Screen coordinates [0, resolution] (inverted y)
int2 screen_co = DispatchRaysIndex().xy;
// Get g-buffer information
float4 albedo_roughness = gbuffer_albedo[screen_co];
float4 normal_metallic = gbuffer_normal[screen_co];
// Unpack G-Buffer
float depth = gbuffer_depth[screen_co].x;
float3 wpos = unpack_position(float2(uv.x, 1.f - uv.y), depth, inv_vp);
float3 normal = normal_metallic.xyz;
// Do lighting
float3 cpos = float3(inv_view[0][3], inv_view[1][3], inv_view[2][3]);
float3 V = normalize(cpos - wpos);
if (length(normal) == 0) //TODO: Could be optimized by only marking pixels that need lighting, but that would require execute rays indirect
{
// A value of 1 in the output buffer, means that there is shadow
// So, the far plane pixels are set to 0
output_refl_shadow[screen_co] = float4(1, 1, 1, 1);
return;
}
wpos += normal * epsilon;
// Get shadow factor
float4 shadow_result = DoShadowAllLights(wpos, V, normal, normal_metallic.w, albedo_roughness.w, albedo_roughness.xyz, shadow_sample_count, 0, CALLINGPASS_SHADOWS, rand_seed);
// xyz: reflection, a: shadow factor
output_refl_shadow[screen_co] = shadow_result;
}
#endif //__DXR_SHADOW_MAIN_HLSL__
================================================
FILE: resources/shaders/dxr_structs.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_STRUCTS_HLSL__
#define __DXR_STRUCTS_HLSL__
struct Vertex
{
float3 pos;
float2 uv;
float3 normal;
float3 tangent;
float3 bitangent;
};
struct MaterialData
{
float3 color;
float metallic;
float roughness;
float emissive_multiplier;
float is_double_sided;
float use_alpha_masking;
float albedo_uv_scale;
float normal_uv_scale;
float roughness_uv_scale;
float metallic_uv_scale;
float emissive_uv_scale;
float ao_uv_scale;
float padding;
uint flags;
};
struct Material
{
uint albedo_id;
uint normal_id;
uint roughness_id;
uint metalicness_id;
uint emissive_id;
uint ao_id;
float2 padding;
MaterialData data;
};
struct Offset
{
uint material_idx;
uint idx_offset;
uint vertex_offset;
};
struct Ray
{
float3 origin;
float3 direction;
};
struct RayCone
{
float width;
float spread_angle;
};
struct ReflectionHitInfo
{
float3 origin;
float3 color;
unsigned int seed;
unsigned int depth;
float hit_t;
RayCone cone;
};
struct ShadowHitInfo
{
float is_hit;
float thisvariablesomehowmakeshybridrenderingwork_killme;
};
struct PathTracingHitInfo
{
float3 color;
unsigned int seed;
float3 origin;
unsigned int depth;
};
struct PathTracingHitInfoCone
{
float3 color;
unsigned int seed;
float3 origin;
unsigned int depth;
RayCone cone;
};
struct FullRTHitInfo
{
float3 color;
unsigned int seed;
float3 origin;
unsigned int depth;
};
struct SurfaceHit
{
float3 pos;
float3 normal;
float surface_spread_angle;
float dist;
};
#endif //__DXR_STRUCTS_HLSL__
================================================
FILE: resources/shaders/dxr_texture_lod.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __DXR_TEXTURE_LOD_HLSL__
#define __DXR_TEXTURE_LOD_HLSL__
//Definition for RayCone
#include "dxr_structs.hlsl"
// numbers prefixed with Cha mean its chapter x.x
// numbers prefixed with Fig means its figure x.x
// pa Fig 20.5
float ComputeTriangleArea(float3 P0, float3 P1, float3 P2)
{
return length(cross((P1 - P0), (P2 - P0)));
}
// ta Fig 20.4
float ComputeTextureCoordsArea(float2 UV0, float2 UV1, float2 UV2, Texture2D T)
{
float w, h;
T.GetDimensions(w, h);
return abs((UV1.x - UV0.x) * (UV2.y - UV0.y) - (UV2.x - UV0.x) * (UV1.y - UV0.y)); // Removed with and height to get mipmapping working in my code.
return w * h * abs((UV1.x - UV0.x) * (UV2.y - UV0.y) - (UV2.x - UV0.x) * (UV1.y - UV0.y)); // Proper formula from Fig 20.4
}
// Ch 20.6
float GetTriangleLODConstant(float3 P0, float3 P1, float3 P2, float2 UV0, float2 UV1, float2 UV2, Texture2D T)
{
float P_a = ComputeTriangleArea(P0, P1, P2);
float T_a = ComputeTextureCoordsArea(UV0, UV1, UV2, T);
return 0.5 * log2(T_a / P_a);
}
// Ch 20.6
float ComputeTextureLOD(RayCone cone, float3 V, float3 N, float3 P0, float3 P1, float3 P2, float2 UV0, float2 UV1, float2 UV2, Texture2D T)
{
float w, h;
T.GetDimensions(w, h);
float lambda = GetTriangleLODConstant(P0, P1, P2, UV0, UV1, UV2, T);
lambda += log2(abs(cone.width));
lambda += 0.5 * log2(w * h);
lambda -= log2(abs(dot(V, N)));
return lambda;
}
// Fig 20.30
float PixelSpreadAngle(float vertical_fov, float output_height)
{
return atan((2.f * tan(vertical_fov / 2.f)) / output_height);
}
float3 dumb_ddx(Texture2D t, float3 v)
{
float2 pixel = DispatchRaysIndex().xy;
float3 top_left = t[float2(pixel.x, pixel.y)].xyz;
float3 top_right = t[float2(pixel.x+1, pixel.y)].xyz;
float3 bottom_left = t[float2(pixel.x, pixel.y+1)].xyz;
float3 bottom_right = t[float2(pixel.x+1, pixel.y+1)].xyz;
float3 v1 = top_right - top_left;
return v1;
}
float3 dumb_ddy(Texture2D t, float3 v)
{
float2 pixel = DispatchRaysIndex().xy;
float3 top_left = t[float2(pixel.x, pixel.y)].xyz;
float3 top_right = t[float2(pixel.x+1, pixel.y)].xyz;
float3 bottom_left = t[float2(pixel.x, pixel.y+1)].xyz;
float3 bottom_right = t[float2(pixel.x+1, pixel.y+1)].xyz;
float3 v2 = bottom_left - top_left;
return v2;
}
float3 dumb_ddx_depth(Texture2D t, float4x4 inv_vp, float3 v)
{
float2 uv = float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy - 1);
uv.y = 1.f - uv.y;
float2 pixel = DispatchRaysIndex().xy;
float3 top_left = t[float2(pixel.x, pixel.y)].xyz;
float3 top_right = t[float2(pixel.x+1, pixel.y)].xyz;
float3 bottom_left = t[float2(pixel.x, pixel.y+1)].xyz;
float3 bottom_right = t[float2(pixel.x+1, pixel.y+1)].xyz;
// Get world space position
const float4 ndc = float4(uv * 2.0 - 1.0, top_left.x, 1.0);
float4 wpos = mul(inv_vp, ndc);
float3 retval = (wpos.xyz / wpos.w).xyz;
const float4 _ndc = float4(uv * 2.0 - 1.0, top_right.x, 1.0);
float4 _wpos = mul(inv_vp, _ndc);
float3 _retval = (_wpos.xyz / _wpos.w).xyz;
return _retval - retval;
}
float3 dumb_ddy_depth(Texture2D t, float4x4 inv_vp, float3 v)
{
float2 uv = float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy - 1);
uv.y = 1.f - uv.y;
float2 pixel = DispatchRaysIndex().xy;
float3 top_left = t[float2(pixel.x, pixel.y)].xyz;
float3 top_right = t[float2(pixel.x+1, pixel.y)].xyz;
float3 bottom_left = t[float2(pixel.x, pixel.y+1)].xyz;
float3 bottom_right = t[float2(pixel.x+1, pixel.y+1)].xyz;
// Get world space position
const float4 ndc = float4(uv * 2.0 - 1.0, bottom_left.x, 1.0);
float4 wpos = mul(inv_vp, ndc);
float3 retval = (wpos.xyz / wpos.w).xyz;
const float4 _ndc = float4(uv * 2.0 - 1.0, top_right.x, 1.0);
float4 _wpos = mul(inv_vp, _ndc);
float3 _retval = (_wpos.xyz / _wpos.w).xyz;
return retval - _retval;
}
float3 dumb_ddx_depth2(Texture2D t, float4x4 inv_vp, float3 v)
{
float2 uv = float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy - 1);
uv.y = 1.f - uv.y;
float2 pixel = DispatchRaysIndex().xy;
float3 top_left = t[float2(pixel.x, pixel.y)].xyz;
float3 top_right = t[float2(pixel.x+1, pixel.y)].xyz;
float3 bottom_left = t[float2(pixel.x, pixel.y+1)].xyz;
float3 bottom_right = t[float2(pixel.x+1, pixel.y+1)].xyz;
float3 v1 = top_right - top_left;
// Get world space position
const float4 ndc = float4(uv * 2.0 - 1.0, v1.x, 1.0);
float4 wpos = mul(inv_vp, ndc);
float3 retval = (wpos.xyz / wpos.w).xyz;
return retval;
}
float3 dumb_ddy_depth2(Texture2D t, float4x4 inv_vp, float3 v)
{
float2 uv = float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy - 1);
uv.y = 1.f - uv.y;
float2 pixel = DispatchRaysIndex().xy;
float3 top_left = t[float2(pixel.x, pixel.y)].xyz;
float3 top_right = t[float2(pixel.x+1, pixel.y)].xyz;
float3 bottom_left = t[float2(pixel.x, pixel.y+1)].xyz;
float3 bottom_right = t[float2(pixel.x+1, pixel.y+1)].xyz;
float3 v2 = bottom_left - top_right;
// Get world space position
const float4 ndc = float4(uv * 2.0 - 1.0, v2.x, 1.0);
float4 wpos = mul(inv_vp, ndc);
float3 retval = (wpos.xyz / wpos.w).xyz;
return retval;
}
// Fig 20.23
float ComputeSurfaceSpreadAngle(Texture2D g_P, Texture2D g_N, /*Texture2D g_DY, Texture2D g_DY2,*/ float4x4 inv_vp, float3 P, float3 N)
{
float2 pixel = DispatchRaysIndex().xy;
float3 aPx = dumb_ddx_depth2(g_P, inv_vp, P);
float3 aPy = dumb_ddy_depth2(g_P, inv_vp, P);
//float3 aPx = dumb_ddx(g_P, P);
//float3 aPy = dumb_ddy(g_P, P);
float3 aNx = dumb_ddx(g_N, N);
float3 aNy = dumb_ddy(g_N, N);
float k1 = 1;
float k2 = 0;
float s = sign(dot(aPx, aNx) + dot(aPy, aNy));
// s = g_DY2[pixel].x; // Sign calculated in the deferred main shader.
// s = 1 // Sets the sign to convex only. can fix a lot of issues.
return 2.f * k1 * s * sqrt(dot(aNx, aNx) + dot(aNy, aNy)) + k2;
}
// Ch 20.6
RayCone Propagate(RayCone cone, float surface_spread_angle, float hit_dist)
{
RayCone new_cone;
new_cone.width = cone.spread_angle * hit_dist + cone.width;
new_cone.spread_angle = cone.spread_angle + surface_spread_angle;
return new_cone;
}
// Ch 20.6
RayCone ComputeRayConeFromGBuffer(SurfaceHit hit, float vertical_fov, float height)
{
RayCone cone;
cone.width = 0;
cone.spread_angle = PixelSpreadAngle(vertical_fov, height);
return Propagate(cone, hit.surface_spread_angle, hit.dist);
}
#endif //__DXR_TEXTURE_LOD_HLSL__
================================================
FILE: resources/shaders/fullscreen_quad.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __FULLSCREEN_QUAD_HLSL__
#define __FULLSCREEN_QUAD_HLSL__
struct VS_OUTPUT
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD;
};
VS_OUTPUT main_vs(float2 pos : POSITION)
{
VS_OUTPUT output;
output.pos = float4(pos.x, pos.y, 0.0f, 1.0f);
output.uv = 0.5 * (pos.xy + float2(1.0, 1.0));
return output;
}
#endif //__FULLSCREEN_QUAD_HLSL__
================================================
FILE: resources/shaders/generate_mips_cs.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
/**
* Compute shader to generate mipmaps for a given texture.
* Source: https://github.com/Microsoft/DirectX-Graphics-Samples/blob/master/MiniEngine/Core/Shaders/GenerateMipsCS.hlsli
*/
#define BLOCK_SIZE 8
// When reducing the size of a texture, it could be that downscaling the texture
// will result in a less than exactly 50% (1/2) of the original texture size.
// This happens if either the width, or the height (or both) dimensions of the texture
// are odd. For example, downscaling a 5x3 texture will result in a 2x1 texture which
// has a 60% reduction in the texture width and 66% reduction in the height.
// When this happens, we need to take more samples from the source texture to
// determine the pixel value in the destination texture.
#define WIDTH_HEIGHT_EVEN 0 // Both the width and the height of the texture are even.
#define WIDTH_ODD_HEIGHT_EVEN 1 // The texture width is odd and the height is even.
#define WIDTH_EVEN_HEIGHT_ODD 2 // The texture width is even and teh height is odd.
#define WIDTH_HEIGHT_ODD 3 // Both the width and height of the texture are odd.
struct ComputeShaderInput
{
uint3 GroupID : SV_GroupID; // 3D index of the thread group in the dispatch.
uint3 GroupThreadID : SV_GroupThreadID; // 3D index of local thread ID in a thread group.
uint3 DispatchThreadID : SV_DispatchThreadID; // 3D index of global thread ID in the dispatch.
uint GroupIndex : SV_GroupIndex; // Flattened local index of the thread within a thread group.
};
cbuffer GenerateMipsCB : register(b0)
{
uint SrcMipLevel; // Texture level of source mip
uint NumMipLevels; // Number of OutMips to write: [1-4]
uint SrcDimension; // Width and height of the source texture are even or odd.
uint Padding; // Pad to 16 byte alignment.
float2 TexelSize; // 1.0 / OutMip1.Dimensions
}
// Source mip map.
Texture2D<float4> SrcMip : register(t0);
// Write up to 4 mip map levels.
RWTexture2D<float4> OutMip1 : register(u0);
RWTexture2D<float4> OutMip2 : register(u1);
RWTexture2D<float4> OutMip3 : register(u2);
RWTexture2D<float4> OutMip4 : register(u3);
// Linear clamp sampler.
SamplerState LinearClampSampler : register(s0);
// The reason for separating channels is to reduce bank conflicts in the
// local data memory controller. A large stride will cause more threads
// to collide on the same memory bank.
groupshared float gs_R[64];
groupshared float gs_G[64];
groupshared float gs_B[64];
groupshared float gs_A[64];
void StoreColor(uint Index, float4 Color)
{
gs_R[Index] = Color.r;
gs_G[Index] = Color.g;
gs_B[Index] = Color.b;
gs_A[Index] = Color.a;
}
float4 LoadColor(uint Index)
{
return float4(gs_R[Index], gs_G[Index], gs_B[Index], gs_A[Index]);
}
float3 LinearToSRGB(float3 x)
{
// This is exactly the sRGB curve
//return x < 0.0031308 ? 12.92 * x : 1.055 * pow(abs(x), 1.0 / 2.4) - 0.055;
// This is cheaper but nearly equivalent
return x < 0.0031308 ? 12.92 * x : 1.13005 * sqrt(abs(x - 0.00228)) - 0.13448 * x + 0.005719;
}
float4 PackColor(float4 Linear)
{
#if defined(CONVERT_TO_SRGB)
return float4(LinearToSRGB(Linear.rgb), Linear.a);
#else
return Linear;
#endif
}
[numthreads(BLOCK_SIZE, BLOCK_SIZE, 1)]
void main(ComputeShaderInput IN)
{
float4 Src1 = (float4)0;
// One bilinear sample is insufficient when scaling down by more than 2x.
// You will slightly undersample in the case where the source dimension
// is odd. This is why it's a really good idea to only generate mips on
// power-of-two sized textures. Trying to handle the undersampling case
// will force this shader to be slower and more complicated as it will
// have to take more source texture samples.
// Determine the path to use based on the dimension of the
// source texture.
// 0b00(0): Both width and height are even.
// 0b01(1): Width is odd, height is even.
// 0b10(2): Width is even, height is odd.
// 0b11(3): Both width and height are odd.
switch (SrcDimension)
{
case WIDTH_HEIGHT_EVEN:
{
float2 UV = TexelSize * (IN.DispatchThreadID.xy + 0.5);
Src1 = SrcMip.SampleLevel(LinearClampSampler, UV, SrcMipLevel);
}
break;
case WIDTH_ODD_HEIGHT_EVEN:
{
// > 2:1 in X dimension
// Use 2 bilinear samples to guarantee we don't undersample when downsizing by more than 2x
// horizontally.
float2 UV1 = TexelSize * (IN.DispatchThreadID.xy + float2(0.25, 0.5));
float2 Off = TexelSize * float2(0.5, 0.0);
Src1 = 0.5 * (SrcMip.SampleLevel(LinearClampSampler, UV1, SrcMipLevel) +
SrcMip.SampleLevel(LinearClampSampler, UV1 + Off, SrcMipLevel));
}
break;
case WIDTH_EVEN_HEIGHT_ODD:
{
// > 2:1 in Y dimension
// Use 2 bilinear samples to guarantee we don't undersample when downsizing by more than 2x
// vertically.
float2 UV1 = TexelSize * (IN.DispatchThreadID.xy + float2(0.5, 0.25));
float2 Off = TexelSize * float2(0.0, 0.5);
Src1 = 0.5 * (SrcMip.SampleLevel(LinearClampSampler, UV1, SrcMipLevel) +
SrcMip.SampleLevel(LinearClampSampler, UV1 + Off, SrcMipLevel));
}
break;
case WIDTH_HEIGHT_ODD:
{
// > 2:1 in in both dimensions
// Use 4 bilinear samples to guarantee we don't undersample when downsizing by more than 2x
// in both directions.
float2 UV1 = TexelSize * (IN.DispatchThreadID.xy + float2(0.25, 0.25));
float2 Off = TexelSize * 0.5;
Src1 = SrcMip.SampleLevel(LinearClampSampler, UV1, SrcMipLevel);
Src1 += SrcMip.SampleLevel(LinearClampSampler, UV1 + float2(Off.x, 0.0), SrcMipLevel);
Src1 += SrcMip.SampleLevel(LinearClampSampler, UV1 + float2(0.0, Off.y), SrcMipLevel);
Src1 += SrcMip.SampleLevel(LinearClampSampler, UV1 + float2(Off.x, Off.y), SrcMipLevel);
Src1 *= 0.25;
}
break;
}
OutMip1[IN.DispatchThreadID.xy] = PackColor(Src1);
// A scalar (constant) branch can exit all threads coherently.
if (NumMipLevels == 1)
return;
// Without lane swizzle operations, the only way to share data with other
// threads is through LDS.
StoreColor(IN.GroupIndex, Src1);
// This guarantees all LDS writes are complete and that all threads have
// executed all instructions so far (and therefore have issued their LDS
// write instructions.)
GroupMemoryBarrierWithGroupSync();
// With low three bits for X and high three bits for Y, this bit mask
// (binary: 001001) checks that X and Y are even.
if ((IN.GroupIndex & 0x9) == 0)
{
float4 Src2 = LoadColor(IN.GroupIndex + 0x01);
float4 Src3 = LoadColor(IN.GroupIndex + 0x08);
float4 Src4 = LoadColor(IN.GroupIndex + 0x09);
Src1 = 0.25 * (Src1 + Src2 + Src3 + Src4);
OutMip2[IN.DispatchThreadID.xy / 2] = PackColor(Src1);
StoreColor(IN.GroupIndex, Src1);
}
if (NumMipLevels == 2)
return;
GroupMemoryBarrierWithGroupSync();
// This bit mask (binary: 011011) checks that X and Y are multiples of four.
if ((IN.GroupIndex & 0x1B) == 0)
{
float4 Src2 = LoadColor(IN.GroupIndex + 0x02);
float4 Src3 = LoadColor(IN.GroupIndex + 0x10);
float4 Src4 = LoadColor(IN.GroupIndex + 0x12);
Src1 = 0.25 * (Src1 + Src2 + Src3 + Src4);
OutMip3[IN.DispatchThreadID.xy / 4] = PackColor(Src1);
StoreColor(IN.GroupIndex, Src1);
}
if (NumMipLevels == 3)
return;
GroupMemoryBarrierWithGroupSync();
// This bit mask would be 111111 (X & Y multiples of 8), but only one
// thread fits that criteria.
if (IN.GroupIndex == 0)
{
float4 Src2 = LoadColor(IN.GroupIndex + 0x04);
float4 Src3 = LoadColor(IN.GroupIndex + 0x20);
float4 Src4 = LoadColor(IN.GroupIndex + 0x24);
Src1 = 0.25 * (Src1 + Src2 + Src3 + Src4);
OutMip4[IN.DispatchThreadID.xy / 8] = PackColor(Src1);
}
}
================================================
FILE: resources/shaders/lighting.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __LIGHTING_HLSL__
#define __LIGHTING_HLSL__
#define CALLINGPASS_SHADOWS 0
#define CALLINGPASS_REFLECTIONS 1
#define CALLINGPASS_PATHTRACING 2
#define CALLINGPASS_FULLRAYTRACING 3
#include "dxr_shadow_functions.hlsl"
struct Light
{
float3 pos; //Position in world space for spot & point
float rad; //Radius for point, height for spot
float3 col; //Color
uint tid; //Type id; light_type_x
float3 dir; //Direction for spot & directional
float ang; //Angle for spot; in radians
float3 padding;
float light_size;
};
StructuredBuffer<Light> lights : LIGHTS_REGISTER;
static uint light_type_point = 0;
static uint light_type_directional = 1;
static uint light_type_spot = 2;
float calc_attenuation(Light light, float3 L, float light_dist)
{
uint tid = light.tid & 3;
float min_cos = cos(light.ang);
float max_cos = lerp(min_cos, 1, 0.5f);
float cos_angle = dot(light.dir, L);
return lerp(smoothstep(min_cos, max_cos, cos_angle), 1.0f - smoothstep(0, light.rad, light_dist), tid != light_type_spot);
}
//Copied version for testing stuff
float3 shade_light(float3 pos, float3 V, float3 albedo, float3 normal, float metallic, float roughness, Light light)
{
uint tid = light.tid & 3;
//Light direction (constant with directional, position dependent with other)
float3 L = (lerp(light.pos - pos, light.dir, tid == light_type_directional));
float light_dist = length(L);
L /= light_dist;
float attenuation = calc_attenuation(light, L, light_dist);
float3 radiance = light.col * attenuation;
float3 lighting = BRDF(L, V, normal, metallic, roughness, albedo, radiance);
return lighting;
}
float3 shade_pixel(float3 pos, float3 V, float3 albedo, float metallic, float roughness, float3 emissive, float3 normal, float3 irradiance, float ao, float3 reflection, float2 brdf, float3 shadow_factor, bool uses_luminance)
{
float3 res = float3(0.0f, 0.0f, 0.0f);
uint light_count = lights[0].tid >> 2; //Light count is stored in 30 upper-bits of first light
if(!uses_luminance)
{
for (uint i = 0; i < light_count; i++)
{
res += shade_light(pos, V, albedo, normal, metallic, roughness, lights[i]);
}
}
else
{
res = albedo * shadow_factor;
}
// Ambient Lighting using Irradiance for Diffuse
float3 kS = F_SchlickRoughness(max(dot(normal, V), 0.0f), metallic, albedo, roughness);
float3 kD = 1.0f - kS;
kD *= 1.0f - metallic;
float3 diffuse = irradiance * albedo;
// Image-Based Lighting using Prefiltered Environment Map and BRDF LUT for Specular
float3 prefiltered_color = reflection;
float2 sampled_brdf = brdf;
float3 specular = prefiltered_color * (kS * sampled_brdf.x + sampled_brdf.y);
//float3 specular = reflection * kS;
float3 ambient = (kD * diffuse + specular) * ao;
return ambient + res + emissive;
}
float3 shade_light(float3 pos, float3 V, float3 albedo, float3 normal, float metallic, float roughness, Light light, inout uint rand_seed, uint shadow_sample_count, uint depth, uint calling_pass)
{
uint tid = light.tid & 3;
//Light direction (constant with directional, position dependent with other)
float3 L = (lerp(light.pos - pos, light.dir, tid == light_type_directional));
float light_dist = length(L);
L /= light_dist;
float attenuation = calc_attenuation(light, L, light_dist);
// Maybe change hard-coded 100000 to be dynamic according to the scene size?
float t_max = lerp(light_dist, 100000, tid == light_type_directional);
float3 radiance = light.col * attenuation;
float3 lighting = BRDF(L, V, normal, metallic, roughness, albedo, radiance);
float3 wpos = pos + (normal * EPSILON);
float shadow_factor = GetShadowFactor(wpos, L, light.light_size, t_max, shadow_sample_count, depth, calling_pass, rand_seed);
lighting *= shadow_factor;
return lighting;
}
float3 shade_pixel(float3 pos, float3 V, float3 albedo, float metallic, float roughness, float3 emissive, float3 normal, inout uint rand_seed, uint shadow_sample_count, uint depth, uint calling_pass)
{
uint light_count = lights[0].tid >> 2; //Light count is stored in 30 upper-bits of first light
float3 res = float3(0, 0, 0);
[unroll]
for (uint i = 0; i < light_count; i++)
{
res += shade_light(pos, V, albedo, normal, metallic, roughness, lights[i], rand_seed, shadow_sample_count, depth, calling_pass);
}
return res + emissive;
}
float4 DoShadowAllLights(float3 wpos, float3 V, float3 normal, float metallic, float roughness, float3 albedo, uint shadow_sample_count, uint depth, uint calling_pass, inout float rand_seed)
{
uint light_count = lights[0].tid >> 2; //Light count is stored in 30 upper-bits of first light
float4 res = float4(0.0, 0.0, 0.0, 0.0);
uint sampled_lights = 0;
for (uint i = 0; i < light_count; i++)
{
// Get light and light type
Light light = lights[i];
uint tid = light.tid & 3;
//Light direction (constant with directional, position dependent with other)
float3 L = (lerp(light.pos - wpos, light.dir, tid == light_type_directional));
float light_dist = length(L);
L /= light_dist;
float dir_dot = dot(L, normal);
if (dir_dot < 0.0f)
{
continue;
}
float attenuation = calc_attenuation(light, L, light_dist);
if (light_dist > light.rad && tid != light_type_directional)
{
continue;
}
float3 radiance = attenuation * light.col;
float3 lighting = BRDF(L, V, normal, metallic, roughness, float3(1.0, 1.0, 1.0), radiance) /* / max(albedo, float3(0.001, 0.001, 0.001)) */;
// Get maxium ray length (depending on type)
float t_max = lerp(light_dist, 100000, tid == light_type_directional);
// Add shadow factor to final result
float shadow = GetShadowFactor(wpos, L, light.light_size, t_max, shadow_sample_count, depth, calling_pass, rand_seed);
res.w += shadow;
res.rgb += lighting * shadow;
sampled_lights++;
}
// return final res
res.w = res.w / float(sampled_lights);
return res;
}
#endif //__LIGHTING_HLSL__
================================================
FILE: resources/shaders/material_util.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __MATERIAL_UTIL_HLSL__
#define __MATERIAL_UTIL_HLSL__
#define MATERIAL_HAS_ALBEDO_TEXTURE 1<<0
#define MATERIAL_HAS_NORMAL_TEXTURE 1<<1
#define MATERIAL_HAS_ROUGHNESS_TEXTURE 1<<2
#define MATERIAL_HAS_METALLIC_TEXTURE 1<<3
#define MATERIAL_HAS_EMISSIVE_TEXTURE 1<<4
#define MATERIAL_HAS_AO_TEXTURE 1<<5
#include "dxr_structs.hlsl"
struct OutputMaterialData
{
float3 albedo;
float alpha;
float roughness;
float3 normal;
float metallic;
float3 emissive;
float ao;
};
OutputMaterialData InterpretMaterialData(MaterialData data,
Texture2D material_albedo,
Texture2D material_normal,
Texture2D material_roughness,
Texture2D material_metallic,
Texture2D material_emissive,
Texture2D material_ambient_occlusion,
SamplerState s0,
float2 uv
)
{
OutputMaterialData output;
float use_albedo_texture = float((data.flags & MATERIAL_HAS_ALBEDO_TEXTURE) != 0);
float use_roughness_texture = float((data.flags & MATERIAL_HAS_ROUGHNESS_TEXTURE) != 0);
float use_metallic_texture = float((data.flags & MATERIAL_HAS_METALLIC_TEXTURE) != 0);
float use_normal_texture = float((data.flags & MATERIAL_HAS_NORMAL_TEXTURE) != 0);
float use_emissive_texture = float((data.flags & MATERIAL_HAS_EMISSIVE_TEXTURE) != 0);
float use_ao_texture = float((data.flags & MATERIAL_HAS_AO_TEXTURE) != 0);
float4 albedo = lerp(float4(data.color, 1), material_albedo.Sample(s0, uv * data.albedo_uv_scale), use_albedo_texture);
#ifdef COMPRESSED
float roughness = lerp(data.roughness, max(0.05f, material_roughness.Sample(s0, uv * data.roughness_uv_scale).y), use_roughness_texture);
float metallic = lerp(data.metallic, material_metallic.Sample(s0, uv * data.metallic_uv_scale).z, use_metallic_texture);
#else
float roughness = lerp(data.roughness, max(0.05f, material_roughness.Sample(s0, uv * data.roughness_uv_scale).x), use_roughness_texture);
float metallic = lerp(data.metallic, material_metallic.Sample(s0, uv * data.metallic_uv_scale).x, use_metallic_texture);
#endif
float3 tex_normal = lerp(float3(0.0f, 0.0f, 1.0f), material_normal.Sample(s0, uv * data.normal_uv_scale).rgb * 2.0f - float3(1.0f, 1.0f, 1.0f), use_normal_texture);
float3 emissive = lerp(float3(0.0f, 0.0f, 0.0f), material_emissive.Sample(s0, uv * data.emissive_uv_scale).xyz, use_emissive_texture);
float ao = lerp(1.0f, material_ambient_occlusion.Sample(s0, uv * data.ao_uv_scale).x, use_ao_texture);
output.albedo = pow(albedo.xyz, 2.2f);
output.alpha = albedo.w;
output.roughness = roughness;
output.normal = tex_normal;
output.metallic = metallic;
output.emissive = pow(emissive,2.2f) * data.emissive_multiplier;
output.ao = ao;
return output;
}
OutputMaterialData InterpretMaterialDataRT(MaterialData data,
Texture2D material_albedo,
Texture2D material_normal,
Texture2D material_roughness,
Texture2D material_metallic,
Texture2D material_emissive,
Texture2D material_ambient_occlusion,
float mip_level,
SamplerState s0,
float2 uv)
{
OutputMaterialData output;
float use_albedo_texture = float((data.flags & MATERIAL_HAS_ALBEDO_TEXTURE) != 0);
float use_roughness_texture = float((data.flags & MATERIAL_HAS_ROUGHNESS_TEXTURE) != 0);
float use_metallic_texture = float((data.flags & MATERIAL_HAS_METALLIC_TEXTURE) != 0);
float use_normal_texture = float((data.flags & MATERIAL_HAS_NORMAL_TEXTURE) != 0);
float use_emissive_texture = float((data.flags & MATERIAL_HAS_EMISSIVE_TEXTURE) != 0);
float use_ao_texture = float((data.flags & MATERIAL_HAS_AO_TEXTURE) != 0);
const float4 albedo = lerp(float4(data.color, 1),
material_albedo.SampleLevel(s0, uv * (data.albedo_uv_scale), mip_level),
use_albedo_texture);
#ifdef COMPRESSED
const float roughness = lerp(data.roughness, max(0.05, material_roughness.SampleLevel(s0, uv * data.roughness_uv_scale, mip_level).z), use_roughness_texture);
const float metallic = lerp(data.metallic, material_metallic.SampleLevel(s0, uv * data.metallic_uv_scale, mip_level).y, use_metallic_texture);
#else
const float roughness = lerp(data.roughness, max(0.05, material_roughness.SampleLevel(s0, uv * data.roughness_uv_scale, mip_level).x), use_roughness_texture);
const float metallic = lerp(data.metallic, material_metallic.SampleLevel(s0, uv * data.metallic_uv_scale, mip_level).x, use_metallic_texture);
#endif
const float3 normal_t = lerp(float3(0.0, 0.0, 1.0),
material_normal.SampleLevel(s0, uv * data.normal_uv_scale, mip_level).xyz * 2 - 1,
use_normal_texture);
float3 emissive = lerp(float3(0.0f, 0.0f, 0.0f),
material_emissive.SampleLevel(s0, uv * data.emissive_uv_scale, mip_level).xyz, use_emissive_texture);
float ao = lerp(1.0f,
material_ambient_occlusion.SampleLevel(s0, uv * data.ao_uv_scale, mip_level).x, use_ao_texture);
output.albedo = pow(albedo.xyz, 2.2f);
output.alpha = albedo.w;
output.roughness = roughness;
output.normal = normal_t;
output.metallic = metallic;
output.emissive = pow(emissive, 2.2f) * data.emissive_multiplier;
output.ao = ao;
return output;
}
#endif //__MATERIAL_UTIL_HLSL__
================================================
FILE: resources/shaders/math.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __MATH_HLSL__
#define __MATH_HLSL__
#define M_PI 3.14159265358979
float linterp(float t) {
return saturate(1.0 - abs(2.0 * t - 1.0));
}
float remap(float t, float a, float b)
{
return saturate((t - a) / (b - a));
}
float4 spectrum_offset(float t)
{
float4 ret;
float lo = step(t, 0.5);
float hi = 1.0 - lo;
float w = linterp(remap(t, 1.0 / 6.0, 5.0 / 6.0));
ret = float4(lo, 1.0, hi, 1.) * float4(1.0 - w, w, 1.0 - w, 1.);
return pow(ret, float4(1.0 / 2.2, 1.0 / 2.2, 1.0 / 2.2, 1.0 / 2.2));
}
#endif //__MATH_HLSL__
================================================
FILE: resources/shaders/pbr_brdf_lut.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
RWTexture2D<float2> output : register(u0);
float2 IntegrateBRDF(float NdotV, float roughness)
{
float3 V;
V.x = sqrt(1.0f - NdotV * NdotV);
V.y = 0.0f;
V.z = NdotV;
float A = 0.0f;
float B = 0.0f;
float3 N = float3(0.0f, 0.0f, 1.0f);
const uint SAMPLE_COUNT = 1024u;
for (uint i = 0; i < SAMPLE_COUNT; ++i)
{
float2 Xi = hammersley2d(i, SAMPLE_COUNT);
float3 H = importanceSample_GGX(Xi, roughness, N);
float3 L = normalize(2.0f * dot(V, H) * H - V);
float NdotL = max(L.z, 0.0f);
float NdotH = max(H.z, 0.0f);
float VdotH = max(dot(V, H), 0.0f);
float NdotV = max(dot(N, V), 0.0f);
if (NdotL > 0.0f)
{
float G = GeometrySmith_IBL(NdotV, NdotL, roughness);
float G_Vis = (G * VdotH) / (NdotH * NdotV);
float Fc = pow(1.0f - VdotH, 5.0f);
A += (1.0f - Fc) * G_Vis;
B += Fc * G_Vis;
}
}
A /= float(SAMPLE_COUNT);
B /= float(SAMPLE_COUNT);
return float2(A, B);
}
[numthreads(16, 16, 1)]
void main_cs(uint3 dt_id : SV_DispatchThreadID)
{
float2 screen_size = float2(0.f, 0.f);
output.GetDimensions(screen_size.x, screen_size.y);
float2 screen_coord = int2(dt_id.x, dt_id.y) + 0.5f;
float2 uv = screen_coord / screen_size;
output[dt_id.xy] = IntegrateBRDF(uv.x, uv.y);
}
================================================
FILE: resources/shaders/pbr_cubemap_conversion.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
struct VS_INPUT
{
float3 pos : POSITION;
//float2 uv : TEXCOORD;
//float3 normal : NORMAL;
//float3 tangent : TANGENT;
//float3 bitangent : BITANGENT;
};
struct VS_OUTPUT
{
float4 pos : SV_POSITION;
float3 local_pos : LOCPOS;
};
cbuffer PassIndex : register (b0)
{
int idx;
}
cbuffer CameraProperties : register(b1)
{
float4x4 projection;
float4x4 view[6];
};
VS_OUTPUT main_vs(VS_INPUT input)
{
VS_OUTPUT output;
output.local_pos = input.pos.xyz;
float4x4 vp = mul(projection, view[idx]);
output.pos = mul(vp, float4(output.local_pos, 1.0f));
return output;
}
struct PS_OUTPUT
{
float4 color;
};
Texture2D equirectangular_texture : register(t0);
SamplerState s0 : register(s0);
float2 SampleSphericalMap(float3 v)
{
float2 inv_atan = float2(0.1591f, 0.3183f);
float2 uv = float2(atan2(v.z, v.x), asin(v.y));
uv *= inv_atan;
uv += 0.5f;
return uv;
}
PS_OUTPUT main_ps(VS_OUTPUT input) : SV_TARGET
{
PS_OUTPUT output;
float2 uv = SampleSphericalMap(normalize(input.local_pos));
float3 color = equirectangular_texture.Sample(s0, uv).rgb;
output.color = float4(color, 1.0f);
return output;
}
================================================
FILE: resources/shaders/pbr_cubemap_convolution.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
struct VS_INPUT
{
float3 pos : POSITION;
float2 uv : TEXCOORD;
float3 normal : NORMAL;
float3 tangent : TANGENT;
float3 bitangent : BITANGENT;
};
struct VS_OUTPUT
{
float4 pos : SV_POSITION;
float3 local_pos : LOCPOS;
};
cbuffer PassIndex : register (b0)
{
int idx;
}
cbuffer CameraProperties : register(b1)
{
float4x4 projection;
float4x4 view[6];
};
VS_OUTPUT main_vs(VS_INPUT input)
{
VS_OUTPUT output;
output.local_pos = input.pos.xyz;
float4x4 vp = mul(projection, view[idx]);
output.pos = mul(vp, float4(output.local_pos, 1.0f));
return output;
}
struct PS_OUTPUT
{
float4 color;
};
TextureCube environment_cubemap : register(t0);
SamplerState s0 : register(s0);
PS_OUTPUT main_ps(VS_OUTPUT input) : SV_TARGET
{
PS_OUTPUT output;
const float PI = 3.14159265359f;
float3 normal = normalize(input.local_pos);
float3 irradiance = float3(0.0f, 0.0f, 0.0f);
float3 up = float3(0.0f, 1.0f, 0.0f);
float3 right = cross(up, normal);
up = cross(normal, right);
float sample_delta = 0.025f;
float nr_samples = 0.0f;
for (float phi = 0.0f; phi < 2.0f * PI; phi += sample_delta)
{
for (float theta = 0.0f; theta < 0.5f * PI; theta += sample_delta)
{
float cos_theta = cos(theta);
float sin_theta = sin(theta);
float3 tangent_sample = float3(sin_theta * cos(phi), sin_theta * sin(phi), cos_theta);
float3 sample_vec = tangent_sample.x * right + tangent_sample.y * up + tangent_sample.z * normal;
irradiance += environment_cubemap.Sample(s0, sample_vec).rgb * cos_theta * sin_theta;
nr_samples++;
}
}
irradiance = PI * irradiance * (1.0f / float(nr_samples));
output.color = float4(irradiance.rgb, 1.0f);
return output;
}
================================================
FILE: resources/shaders/pbr_prefilter_env_map.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#include "rand_util.hlsl"
#include "pbr_util.hlsl"
TextureCube<float4> src_texture : register(t0);
RWTexture2D<float4> dst_texture : register(u0);
SamplerState s0 : register(s0);
cbuffer CB : register(b0)
{
float2 texture_size;
float2 skybox_res;
float roughness;
uint cubemap_face;
}
[numthreads(8, 8, 1)]
void main_cs(uint3 dt_id : SV_DispatchThreadID)
{
float2 position = float2(dt_id.xy + 0.5f) / texture_size;
position.y = 1.0f - position.y;
position = (position - 0.5f) * 2.0f;
float3 direction = float3(0.0f, 0.0f, 0.0f);
float3 up = float3(0.0f, 0.0f, 0.0f);
switch (cubemap_face)
{
case 0: direction = float3(1.0f, position.y, -position.x); up = float3(0.0f, 1.0f, 0.0f); break; // +X
case 1: direction = float3(-1.0f, position.y, position.x); up = float3(0.0f, 1.0f, 0.0f); break; // -X
case 2: direction = float3(position.x, 1.0f, -position.y); up = float3(0.0f, 0.0f, -1.0f); break; // +Y
case 3: direction = float3(position.x, -1.0f, position.y); up = float3(0.0f, 0.0f, 1.0f); break; // -Y
case 4: direction = float3(position.x, position.y, 1.0f); up = float3(0.0f, 1.0f, 0.0f); break; // +Z
case 5: direction = float3(-position.x, position.y, -1.0f); up = float3(0.0f, 1.0f, 0.0f); break; // -Z
}
float3 N = normalize(direction);
float3 right = normalize(cross(up, N));
up = cross(N, right);
float3 R = N;
float3 V = R;
const uint SAMPLE_COUNT = 1024u;
float total_weight = 0.0f;
float3 prefiltered_color = float3(0.0f, 0.0f, 0.0f);
for (uint i = 0u; i < SAMPLE_COUNT; i++)
{
float2 Xi = hammersley2d(i, SAMPLE_COUNT);
float3 H = importanceSample_GGX(Xi, roughness, N);
float3 L = normalize(2.0f * dot(V, H) * H - V);
float NdotL = max(dot(N, L), 0.0f);
if (NdotL > 0.0f)
{
float NdotH = max(dot(N, H), 0.0f);
float HdotV = max(dot(H, V), 0.0f);
float D = D_GGX(NdotH, roughness);
float pdf = D * NdotH / (4.0f * HdotV) + 0.0001f;
float sa_texel = 4.0f * M_PI / (6.0f * skybox_res.x * skybox_res.y);
float sa_sample = 1.0f / (float(SAMPLE_COUNT) * pdf + 0.0001f);
float mip_level = roughness == 0.0f ? 0.0f : 0.5f * log2(sa_sample / sa_texel);
prefiltered_color += src_texture.SampleLevel(s0, L, mip_level).rgb * NdotL;
total_weight += NdotL;
}
}
prefiltered_color = prefiltered_color / total_weight;
//Write the final color into the destination texture.
dst_texture[dt_id.xy] = float4(prefiltered_color, 1.0f);
}
================================================
FILE: resources/shaders/pbr_util.hlsl
================================================
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Meine Zeinstra, Tahar Meijs, Koen Buitenhuis, Niels Brunekreef, Darius Bouma, Florian Schut)
*
* 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.
*/
#ifndef __PBR_UTILS_HLSL__
#define __PBR_UTILS_HLSL__
#include "math.hlsl"
#include "rand_util.hlsl"
// Based omn http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/
float random(float2 co)
{
float a = 12.9898;
float b = 78.233;
float c = 43758.5453;
float dt = dot(co.xy, float2(a, b));
float sn = fmod(dt, 3.14);
return frac(sin(sn) * c);
}
// Radical inverse based on http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html
float2 hammersley2d(uint i, uint num)
{
uint bits = (i << 16u) | (i >> 16u);
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
float rdi = float(bits) * 2.3283064365386963e-10;
return float2(float(i) / float(num), rdi);
}
// Based on http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_slides.pdf
float3 importanceSample_GGX(float2 Xi, float roughness, float3 normal)
{
// Maps a 2D point to a hemisphere with spread based on roughness
float alpha = roughness * roughness;
//float phi = 2.f * M_PI * Xi.x + random(normal.xz) * 0.1;
float phi = 2.f * M_PI * Xi.x;
float cosTheta = sqrt((1.f - Xi.y) / (1.f + (alpha*alpha - 1.f) * Xi.y));
float sinTheta = sqrt(1.f - cosTheta * cosTheta);
float3 H;
H.x = sinTheta * cos(phi);
H.y = sinTheta * sin(phi);
H.z = cosTheta;
// Tangent space
float3 up = abs(normal.z) < 0.999 ? float3(0.f, 0.f, 1.f) : float3(1.f, 0.f, 0.f);
float3 tangentX = normalize(cross(up, normal));
float3 tangentY = cross(normal, tangentX);
// Convert to world Space
return normalize(tangentX * H.x + tangentY * H.y + normal * H.z);
}
// Normal distribution
float D_GGX(float dotNH, float roughness)
{
float alpha = roughness * roughness;
float alpha2 = alpha * alpha;
float denom = dotNH * dotNH * (alpha2 - 1.0) + 1.0;
return (alpha2)/(M_PI * denom * denom);
}
// Get a GGX half vector / microfacet normal, sampled according to the distribution computed by
// the function ggxNormalDistribution() above.
//
// When using this function to sample, the probability density is pdf = D * NdotH / (4 * HdotV)
float3 getGGXMicrofacet(inout uint randSeed, float roughness, float3 hitNorm)
{
// Get our uniform random numbers
float2 randVal = float2(nextRand(randSeed), nextRand(randSeed));
// Get an orthonormal basis from the normal
float3 B = getPerpendicularVector(hitNorm);
float3 T = cross(B, hitNorm);
// GGX NDF sampling
float a2 = roughness * roughness;
float cosThetaH = sqrt(max(0.0f, (1.0 - randVal.x) / ((a2 - 1.0) * randVal.x + 1)));
float sinThetaH = sqrt(max(0.0f, 1.0f - cosThetaH * cosThetaH));
float phiH = randVal.y * M_PI * 2.0f;
// Get our GGX NDF sample (i.e., the half vector)
return T * (sinThetaH * cos(phiH)) + B * (sinThetaH * sin(phiH)) + hitNorm * cosThetaH;
}
// Geometric Shadowing function
float G_SchlicksmithGGX(float NdotL, float NdotV, float roughness
gitextract_vk1cvjis/ ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ ├── design-change.md │ │ ├── feature_request.md │ │ └── re-factor-request.md │ └── PULL_REQUEST_TEMPLATE/ │ └── pull_request_template.md ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── CODE_OF_CONDUCT.md ├── Jenkinsfile ├── LICENSE ├── README.md ├── imgui.ini ├── resources/ │ ├── alien_lights.json │ ├── shaders/ │ │ ├── deferred_composition_pass.hlsl │ │ ├── deferred_geometry_pass.hlsl │ │ ├── denoising_SVGF.hlsl │ │ ├── denoising_reflections.hlsl │ │ ├── denoising_spatial_reconstruction.hlsl │ │ ├── dxr_ambient_occlusion.hlsl │ │ ├── dxr_functions.hlsl │ │ ├── dxr_global.hlsl │ │ ├── dxr_pathtracer_accumulation.hlsl │ │ ├── dxr_pathtracer_entries.hlsl │ │ ├── dxr_pathtracer_functions.hlsl │ │ ├── dxr_pathtracer_main.hlsl │ │ ├── dxr_raytracing.hlsl │ │ ├── dxr_reflection_entries.hlsl │ │ ├── dxr_reflection_functions.hlsl │ │ ├── dxr_reflection_main.hlsl │ │ ├── dxr_shadow_entries.hlsl │ │ ├── dxr_shadow_functions.hlsl │ │ ├── dxr_shadow_main.hlsl │ │ ├── dxr_structs.hlsl │ │ ├── dxr_texture_lod.hlsl │ │ ├── fullscreen_quad.hlsl │ │ ├── generate_mips_cs.hlsl │ │ ├── lighting.hlsl │ │ ├── material_util.hlsl │ │ ├── math.hlsl │ │ ├── pbr_brdf_lut.hlsl │ │ ├── pbr_cubemap_conversion.hlsl │ │ ├── pbr_cubemap_convolution.hlsl │ │ ├── pbr_prefilter_env_map.hlsl │ │ ├── pbr_util.hlsl │ │ ├── pp_bloom_blur.hlsl │ │ ├── pp_bloom_blur_horizontal.hlsl │ │ ├── pp_bloom_blur_vertical.hlsl │ │ ├── pp_bloom_composition.hlsl │ │ ├── pp_bloom_extract_bright.hlsl │ │ ├── pp_bloom_util.hlsl │ │ ├── pp_dof_bokeh.hlsl │ │ ├── pp_dof_bokeh_post_filter.hlsl │ │ ├── pp_dof_coc.hlsl │ │ ├── pp_dof_composition.hlsl │ │ ├── pp_dof_compute_near_mask.hlsl │ │ ├── pp_dof_dilate.hlsl │ │ ├── pp_dof_downscale.hlsl │ │ ├── pp_dof_properties.hlsl │ │ ├── pp_dof_util.hlsl │ │ ├── pp_fxaa.hlsl │ │ ├── pp_hdr_util.hlsl │ │ ├── pp_tonemapping.hlsl │ │ ├── pp_util.hlsl │ │ └── rand_util.hlsl │ ├── sponza_lights.json │ └── viknell_lights.json ├── scripts/ │ └── JenkinsWebhook.bat ├── src/ │ ├── constant_buffer_pool.cpp │ ├── constant_buffer_pool.hpp │ ├── d3d12/ │ │ ├── d3d12_acceleration_structure..cpp │ │ ├── d3d12_command_list.cpp │ │ ├── d3d12_command_queue.cpp │ │ ├── d3d12_constant_buffer_pool.cpp │ │ ├── d3d12_constant_buffer_pool.hpp │ │ ├── d3d12_defines.hpp │ │ ├── d3d12_descriptor_heap.cpp │ │ ├── d3d12_descriptors_allocations.cpp │ │ ├── d3d12_descriptors_allocations.hpp │ │ ├── d3d12_device.cpp │ │ ├── d3d12_dynamic_descriptor_heap.cpp │ │ ├── d3d12_dynamic_descriptor_heap.hpp │ │ ├── d3d12_enums.hpp │ │ ├── d3d12_fence.cpp │ │ ├── d3d12_functions.hpp │ │ ├── d3d12_heap.cpp │ │ ├── d3d12_indirect_command_buffer.cpp │ │ ├── d3d12_material_pool.cpp │ │ ├── d3d12_material_pool.hpp │ │ ├── d3d12_model_pool.cpp │ │ ├── d3d12_model_pool.hpp │ │ ├── d3d12_pipeline_state.cpp │ │ ├── d3d12_readback_buffer.cpp │ │ ├── d3d12_render_target.cpp │ │ ├── d3d12_render_window.cpp │ │ ├── d3d12_renderer.cpp │ │ ├── d3d12_renderer.hpp │ │ ├── d3d12_resource_pool_texture.cpp │ │ ├── d3d12_resource_pool_texture.hpp │ │ ├── d3d12_root_signature.cpp │ │ ├── d3d12_rt_descriptor_heap.cpp │ │ ├── d3d12_rt_descriptor_heap.hpp │ │ ├── d3d12_settings.hpp │ │ ├── d3d12_shader.cpp │ │ ├── d3d12_shader_table.cpp │ │ ├── d3d12_staging_buffer.cpp │ │ ├── d3d12_state_object.cpp │ │ ├── d3d12_structs.hpp │ │ ├── d3d12_structured_buffer.cpp │ │ ├── d3d12_structured_buffer_pool.cpp │ │ ├── d3d12_structured_buffer_pool.hpp │ │ ├── d3d12_texture_resources.hpp │ │ ├── d3d12_textures.cpp │ │ ├── d3d12_viewport.cpp │ │ └── d3dx12.hpp │ ├── engine_registry.cpp │ ├── engine_registry.hpp │ ├── entry.hpp │ ├── frame_graph/ │ │ └── frame_graph.hpp │ ├── id_factory.cpp │ ├── id_factory.hpp │ ├── imgui/ │ │ ├── ImGuizmo.cpp │ │ ├── ImGuizmo.h │ │ ├── imconfig.hpp │ │ ├── imgui.cpp │ │ ├── imgui.hpp │ │ ├── imgui_draw.cpp │ │ ├── imgui_impl_dx12.cpp │ │ ├── imgui_impl_dx12.hpp │ │ ├── imgui_impl_win32.cpp │ │ ├── imgui_impl_win32.hpp │ │ ├── imgui_internal.hpp │ │ ├── imgui_widgets.cpp │ │ ├── imstb_rectpack.hpp │ │ ├── imstb_textedit.hpp │ │ └── imstb_truetype.hpp │ ├── imgui_graphics_settings.hpp │ ├── imgui_tools.cpp │ ├── imgui_tools.hpp │ ├── material_pool.cpp │ ├── material_pool.hpp │ ├── model_loader.cpp │ ├── model_loader.hpp │ ├── model_loader_assimp.cpp │ ├── model_loader_assimp.hpp │ ├── model_loader_tinygltf.cpp │ ├── model_loader_tinygltf.hpp │ ├── model_pool.cpp │ ├── model_pool.hpp │ ├── pipeline_registry.cpp │ ├── pipeline_registry.hpp │ ├── platform_independend_structs.hpp │ ├── registry.hpp │ ├── render_tasks/ │ │ ├── d3d12_accumulation.hpp │ │ ├── d3d12_ansel.hpp │ │ ├── d3d12_bloom_composition.hpp │ │ ├── d3d12_bloom_extract_bright.hpp │ │ ├── d3d12_bloom_horizontal_blur.hpp │ │ ├── d3d12_bloom_vertical_blur.hpp │ │ ├── d3d12_brdf_lut_precalculation.hpp │ │ ├── d3d12_build_acceleration_structures.hpp │ │ ├── d3d12_cubemap_convolution.hpp │ │ ├── d3d12_deferred_composition.cpp │ │ ├── d3d12_deferred_composition.hpp │ │ ├── d3d12_deferred_main.hpp │ │ ├── d3d12_deferred_render_target_copy.hpp │ │ ├── d3d12_dof_bokeh.hpp │ │ ├── d3d12_dof_bokeh_postfilter.hpp │ │ ├── d3d12_dof_coc.hpp │ │ ├── d3d12_dof_composition.hpp │ │ ├── d3d12_dof_compute_near_mask.hpp │ │ ├── d3d12_dof_dilate_flatten.hpp │ │ ├── d3d12_dof_dilate_flatten_second_pass.hpp │ │ ├── d3d12_dof_dilate_near.hpp │ │ ├── d3d12_down_scale.hpp │ │ ├── d3d12_equirect_to_cubemap.hpp │ │ ├── d3d12_hbao.hpp │ │ ├── d3d12_imgui_render_task.hpp │ │ ├── d3d12_path_tracer.hpp │ │ ├── d3d12_post_processing.hpp │ │ ├── d3d12_raytracing_task.hpp │ │ ├── d3d12_reflection_denoiser.hpp │ │ ├── d3d12_rt_hybrid_helpers.hpp │ │ ├── d3d12_rt_reflection_task.hpp │ │ ├── d3d12_rt_shadow_task.hpp │ │ ├── d3d12_rtao_task.hpp │ │ ├── d3d12_shadow_denoiser_task.hpp │ │ └── d3d12_spatial_reconstruction.hpp │ ├── renderer.cpp │ ├── renderer.hpp │ ├── resource_pool_texture.cpp │ ├── resource_pool_texture.hpp │ ├── root_signature_registry.cpp │ ├── root_signature_registry.hpp │ ├── rt_pipeline_registry.cpp │ ├── rt_pipeline_registry.hpp │ ├── scene_graph/ │ │ ├── camera_node.cpp │ │ ├── camera_node.hpp │ │ ├── light_node.cpp │ │ ├── light_node.hpp │ │ ├── mesh_node.cpp │ │ ├── mesh_node.hpp │ │ ├── node.cpp │ │ ├── node.hpp │ │ ├── scene_graph.cpp │ │ ├── scene_graph.hpp │ │ ├── skybox_node.cpp │ │ └── skybox_node.hpp │ ├── settings.hpp │ ├── shader_registry.cpp │ ├── shader_registry.hpp │ ├── structs.hpp │ ├── structured_buffer_pool.cpp │ ├── structured_buffer_pool.hpp │ ├── util/ │ │ ├── aabb.cpp │ │ ├── aabb.hpp │ │ ├── bitmap_allocator.hpp │ │ ├── defines.hpp │ │ ├── delegate.hpp │ │ ├── file_watcher.cpp │ │ ├── file_watcher.hpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── logfile_handler.cpp │ │ ├── logfile_handler.hpp │ │ ├── named_type.hpp │ │ ├── pair_hash.hpp │ │ ├── strings.hpp │ │ ├── thread_pool.hpp │ │ └── user_literals.hpp │ ├── version.hpp │ ├── vertex.hpp │ ├── window.cpp │ ├── window.hpp │ ├── wisp.hpp │ └── wisprenderer_export.hpp ├── tests/ │ ├── CMakeLists.txt │ ├── common/ │ │ ├── scene.cpp │ │ └── scene.hpp │ ├── demo/ │ │ ├── debug_camera.hpp │ │ ├── demo.cpp │ │ ├── demo_frame_graphs.hpp │ │ ├── engine_interface.hpp │ │ ├── physics_engine.cpp │ │ ├── physics_engine.hpp │ │ ├── physics_node.cpp │ │ ├── physics_node.hpp │ │ ├── scene_alien.cpp │ │ ├── scene_alien.hpp │ │ ├── scene_emibl.cpp │ │ ├── scene_emibl.hpp │ │ ├── scene_sponza.cpp │ │ ├── scene_sponza.hpp │ │ ├── scene_viknell.cpp │ │ ├── scene_viknell.hpp │ │ ├── spline_library/ │ │ │ ├── LICENSE │ │ │ ├── spline.h │ │ │ ├── splines/ │ │ │ │ ├── cubic_hermite_spline.h │ │ │ │ ├── generic_b_spline.h │ │ │ │ ├── natural_spline.h │ │ │ │ ├── quintic_hermite_spline.h │ │ │ │ ├── uniform_cr_spline.h │ │ │ │ └── uniform_cubic_bspline.h │ │ │ ├── utils/ │ │ │ │ ├── arclength.h │ │ │ │ ├── calculus.h │ │ │ │ ├── linearalgebra.h │ │ │ │ ├── nanoflann.hpp │ │ │ │ ├── spline_common.h │ │ │ │ ├── splineinverter.h │ │ │ │ └── splinesample_adaptor.h │ │ │ └── vector.h │ │ ├── spline_node.cpp │ │ └── spline_node.hpp │ └── graphics_benchmark/ │ ├── frame_graphs.cpp │ ├── frame_graphs.hpp │ ├── graphics_benchmark.cpp │ ├── spheres_scene.cpp │ └── spheres_scene.hpp └── wisp.version
Showing preview only (308K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2935 symbols across 192 files)
FILE: src/constant_buffer_pool.cpp
type wr (line 18) | namespace wr
function ConstantBufferHandle (line 24) | ConstantBufferHandle* ConstantBufferPool::Create(std::size_t buffer_size)
FILE: src/constant_buffer_pool.hpp
type wr (line 26) | namespace wr
class ConstantBufferPool (line 29) | class ConstantBufferPool
method ConstantBufferPool (line 42) | ConstantBufferPool(ConstantBufferPool const &) = delete;
method ConstantBufferPool (line 43) | ConstantBufferPool& operator=(ConstantBufferPool const &) = delete;
method ConstantBufferPool (line 44) | ConstantBufferPool(ConstantBufferPool&&) = delete;
method ConstantBufferPool (line 45) | ConstantBufferPool& operator=(ConstantBufferPool&&) = delete;
type ConstantBufferHandle (line 31) | struct ConstantBufferHandle
class ConstantBufferPool (line 36) | class ConstantBufferPool
method ConstantBufferPool (line 42) | ConstantBufferPool(ConstantBufferPool const &) = delete;
method ConstantBufferPool (line 43) | ConstantBufferPool& operator=(ConstantBufferPool const &) = delete;
method ConstantBufferPool (line 44) | ConstantBufferPool(ConstantBufferPool&&) = delete;
method ConstantBufferPool (line 45) | ConstantBufferPool& operator=(ConstantBufferPool&&) = delete;
FILE: src/d3d12/d3d12_acceleration_structure..cpp
type wr::d3d12 (line 23) | namespace wr::d3d12
type internal (line 32) | namespace internal
function AllocateUAVBuffer (line 35) | inline void AllocateUAVBuffer(Device* device, UINT64 size, ID3D12Res...
function AllocateUploadBuffer (line 52) | inline void AllocateUploadBuffer(Device* device, void* data, UINT64 ...
function UpdateUploadbuffer (line 74) | inline void UpdateUploadbuffer(void* data, UINT64 size, ID3D12Resour...
function WRAPPED_GPU_POINTER (line 82) | WRAPPED_GPU_POINTER CreateFallbackWrappedPointer(
function UpdatePrebuildInfo (line 117) | inline void UpdatePrebuildInfo(Device* device, AccelerationStructure...
function BuildAS (line 130) | inline void BuildAS(Device* device, CommandList* cmd_list, Descripto...
function CreateInstancesForTLAS (line 150) | inline void CreateInstancesForTLAS(Device* device, AccelerationStruc...
function CopyInstDescResource (line 231) | inline void CopyInstDescResource(CommandList* cmd_list, Acceleration...
function CopyAS (line 236) | inline void CopyAS(Device* device, CommandList* cmd_list, Accelerati...
function AccelerationStructure (line 253) | [[nodiscard]] AccelerationStructure CreateBottomLevelAccelerationStruc...
function AccelerationStructure (line 337) | AccelerationStructure CreateTopLevelAccelerationStructure(Device* device,
function DestroyAccelerationStructure (line 403) | void DestroyAccelerationStructure(AccelerationStructure& structure)
function UAVBarrierAS (line 417) | void UAVBarrierAS(CommandList* cmd_list, AccelerationStructure const &...
function UpdateTopLevelAccelerationStructure (line 423) | void UpdateTopLevelAccelerationStructure(AccelerationStructure& tlas, ...
function SetName (line 480) | void SetName(AccelerationStructure& acceleration_structure, std::wstri...
function CreateOrUpdateTLAS (line 495) | void CreateOrUpdateTLAS(Device* device, CommandList* cmd_list, bool& r...
FILE: src/d3d12/d3d12_command_list.cpp
type wr::d3d12 (line 24) | namespace wr::d3d12
function CommandList (line 26) | CommandList* CreateCommandList(Device* device, unsigned int num_alloca...
function SetName (line 70) | void SetName(CommandList* cmd_list, std::string const& name)
function SetName (line 75) | void SetName(CommandList* cmd_list, std::wstring const& name)
function Begin (line 85) | void Begin(CommandList* cmd_list, unsigned int frame_idx)
function End (line 105) | void End(CommandList* cmd_list)
function ExecuteBundle (line 110) | void ExecuteBundle(CommandList* cmd_list, CommandList* bundle)
function ExecuteIndirect (line 115) | void ExecuteIndirect(CommandList* cmd_list, CommandSignature* cmd_sign...
function BindRenderTarget (line 120) | void BindRenderTarget(CommandList* cmd_list, RenderTarget* render_targ...
function BindRenderTargetVersioned (line 151) | void BindRenderTargetVersioned(CommandList* cmd_list, RenderTarget* re...
function BindRenderTargetOnlyDepth (line 176) | void BindRenderTargetOnlyDepth(CommandList* cmd_list, RenderTarget* re...
function BindPipeline (line 193) | void BindPipeline(CommandList* cmd_list, PipelineState* pipeline_state...
function BindDescriptorHeap (line 204) | void BindDescriptorHeap(CommandList* cmd_list, DescriptorHeap* heap, D...
function BindDescriptorHeaps (line 215) | void BindDescriptorHeaps(CommandList* cmd_list, bool fallback)
function BindComputePipeline (line 239) | void BindComputePipeline(CommandList* cmd_list, PipelineState * pipeli...
function BindRaytracingPipeline (line 252) | void BindRaytracingPipeline(CommandList* cmd_list, StateObject* state_...
function BindViewport (line 267) | void BindViewport(CommandList* cmd_list, Viewport const & viewport)
function BindVertexBuffer (line 273) | void BindVertexBuffer(CommandList* cmd_list, StagingBuffer* buffer, st...
function BindIndexBuffer (line 288) | void BindIndexBuffer(CommandList* cmd_list, StagingBuffer* buffer, std...
function BindConstantBuffer (line 303) | void BindConstantBuffer(CommandList* cmd_list, HeapResource* buffer, u...
function Bind32BitConstants (line 308) | void Bind32BitConstants(CommandList* cmd_list, const void* data_to_set...
function BindCompute32BitConstants (line 313) | void BindCompute32BitConstants(CommandList* cmd_list, const void* data...
function BindComputeConstantBuffer (line 318) | void BindComputeConstantBuffer(CommandList * cmd_list, HeapResource* b...
function BindComputeShaderResourceView (line 324) | void BindComputeShaderResourceView(CommandList * cmd_list, ID3D12Resou...
function BindComputeUnorederedAccessView (line 329) | void BindComputeUnorederedAccessView(CommandList * cmd_list, ID3D12Res...
function BindDescriptorTable (line 334) | void BindDescriptorTable(CommandList* cmd_list, DescHeapGPUHandle& han...
function BindComputeDescriptorTable (line 339) | void BindComputeDescriptorTable(CommandList * cmd_list, DescHeapGPUHan...
function SetPrimitiveTopology (line 344) | void SetPrimitiveTopology(CommandList* cmd_list, D3D12_PRIMITIVE_TOPOL...
function Draw (line 349) | void Draw(CommandList* cmd_list, std::uint32_t vertex_count, std::uint...
function DrawIndexed (line 359) | void DrawIndexed(CommandList* cmd_list, std::uint32_t idx_count, std::...
function Dispatch (line 369) | void Dispatch(CommandList * cmd_list, unsigned int thread_group_count_...
function Transition (line 379) | void Transition(CommandList* cmd_list, RenderTarget* render_target, un...
function Transition (line 390) | void Transition(CommandList* cmd_list, RenderTarget* render_target, Re...
function Transition (line 407) | void Transition(CommandList* cmd_list, TextureResource* texture, Resou...
function Transition (line 421) | void Transition(CommandList* cmd_list, TextureResource* texture, Resou...
function TransitionSubresource (line 436) | void TransitionSubresource(CommandList* cmd_list, TextureResource* tex...
function Transition (line 450) | void Transition(CommandList* cmd_list, std::vector<TextureResource*> c...
function Transition (line 473) | void Transition(CommandList* cmd_list, IndirectCommandBuffer* buffer, ...
function Transition (line 483) | void Transition(CommandList* cmd_list, StagingBuffer* buffer, Resource...
function TransitionDepth (line 493) | void TransitionDepth(CommandList* cmd_list, RenderTarget* render_targe...
function UAVBarrier (line 503) | void UAVBarrier(CommandList* cmd_list, std::vector<TextureResource*> c...
function UAVBarrier (line 515) | void UAVBarrier(CommandList* cmd_list, std::vector<ID3D12Resource*> co...
function Alias (line 527) | void Alias(CommandList* cmd_list, TextureResource* resource_before, Te...
function Destroy (line 537) | void Destroy(CommandList* cmd_list)
function CommandSignature (line 548) | CommandSignature* CreateCommandSignature(Device* device, RootSignature...
function DispatchRays (line 563) | void DispatchRays(CommandList* cmd_list, ShaderTable* hitgroup_table, ...
function SetName (line 596) | void SetName(CommandSignature * cmd_signature, std::wstring name)
function Destroy (line 601) | void Destroy(CommandSignature* cmd_signature)
FILE: src/d3d12/d3d12_command_queue.cpp
type wr::d3d12 (line 21) | namespace wr::d3d12
function CommandQueue (line 24) | CommandQueue* CreateCommandQueue(Device* device, CmdListType type)
function Execute (line 40) | void Execute(CommandQueue* cmd_queue, std::vector<CommandList*> const ...
function Destroy (line 56) | void Destroy(CommandQueue* cmd_queue)
function SetName (line 61) | void SetName(CommandQueue * cmd_queue, std::wstring name)
FILE: src/d3d12/d3d12_constant_buffer_pool.cpp
type wr (line 22) | namespace wr
function ConstantBufferHandle (line 53) | ConstantBufferHandle* D3D12ConstantBufferPool::AllocateConstantBuffer(...
FILE: src/d3d12/d3d12_constant_buffer_pool.hpp
type wr (line 20) | namespace wr
type D3D12ConstantBufferHandle (line 23) | struct D3D12ConstantBufferHandle : ConstantBufferHandle
class D3D12RenderSystem (line 28) | class D3D12RenderSystem
class D3D12ConstantBufferPool (line 30) | class D3D12ConstantBufferPool : public ConstantBufferPool
FILE: src/d3d12/d3d12_defines.hpp
function HResultToString (line 27) | inline std::string HResultToString(HRESULT hr)
function T (line 69) | constexpr inline T SizeAlignTwoPower(T size, A alignment)
function T (line 76) | constexpr inline T SizeAlignAnyAlignment(T size, A alignment)
FILE: src/d3d12/d3d12_descriptor_heap.cpp
type wr::d3d12 (line 21) | namespace wr::d3d12
function DescriptorHeap (line 24) | DescriptorHeap* CreateDescriptorHeap(Device* device, desc::DescriptorH...
function DescHeapGPUHandle (line 48) | DescHeapGPUHandle GetGPUHandle(DescriptorHeap* desc_heap, unsigned int...
function DescHeapCPUHandle (line 62) | DescHeapCPUHandle GetCPUHandle(DescriptorHeap* desc_heap, unsigned int...
function SetName (line 76) | void SetName(DescriptorHeap * desc_heap, std::wstring name)
function Offset (line 84) | void Offset(DescHeapGPUHandle& handle, unsigned int index, unsigned in...
function Offset (line 89) | void Offset(DescHeapCPUHandle& handle, unsigned int index, unsigned in...
function Destroy (line 94) | void Destroy(DescriptorHeap* desc_heap)
FILE: src/d3d12/d3d12_descriptors_allocations.cpp
type wr (line 23) | namespace wr
function DescriptorAllocation (line 60) | DescriptorAllocation& DescriptorAllocation::operator=(DescriptorAlloca...
function DescriptorHeapType (line 154) | DescriptorHeapType DescriptorAllocatorPage::GetHeapType() const
function DescriptorAllocation (line 176) | DescriptorAllocation DescriptorAllocatorPage::Allocate(uint32_t num_de...
function DescriptorAllocation (line 361) | DescriptorAllocation DescriptorAllocator::Allocate(uint32_t num_dscrip...
type wr (line 119) | namespace wr
function DescriptorAllocation (line 60) | DescriptorAllocation& DescriptorAllocation::operator=(DescriptorAlloca...
function DescriptorHeapType (line 154) | DescriptorHeapType DescriptorAllocatorPage::GetHeapType() const
function DescriptorAllocation (line 176) | DescriptorAllocation DescriptorAllocatorPage::Allocate(uint32_t num_de...
function DescriptorAllocation (line 361) | DescriptorAllocation DescriptorAllocator::Allocate(uint32_t num_dscrip...
type wr (line 332) | namespace wr
function DescriptorAllocation (line 60) | DescriptorAllocation& DescriptorAllocation::operator=(DescriptorAlloca...
function DescriptorHeapType (line 154) | DescriptorHeapType DescriptorAllocatorPage::GetHeapType() const
function DescriptorAllocation (line 176) | DescriptorAllocation DescriptorAllocatorPage::Allocate(uint32_t num_de...
function DescriptorAllocation (line 361) | DescriptorAllocation DescriptorAllocator::Allocate(uint32_t num_dscrip...
FILE: src/d3d12/d3d12_descriptors_allocations.hpp
type wr (line 29) | namespace wr
class DescriptorAllocatorPage (line 32) | class DescriptorAllocatorPage
type FreeBlockInfo (line 155) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type FreeBlockInfo (line 164) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type StaleDescriptorInfo (line 174) | struct StaleDescriptorInfo
method StaleDescriptorInfo (line 176) | StaleDescriptorInfo(OffsetType offset, SizeType size, uint64_t frame)
class D3D12RenderSystem (line 35) | class D3D12RenderSystem
class DescriptorAllocation (line 42) | class DescriptorAllocation
method DescriptorAllocation (line 57) | DescriptorAllocation(const DescriptorAllocation&) = delete;
method DescriptorAllocation (line 58) | DescriptorAllocation& operator=(const DescriptorAllocation&) = delete;
class DescriptorAllocatorPage (line 96) | class DescriptorAllocatorPage : public std::enable_shared_from_this<De...
type FreeBlockInfo (line 155) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type FreeBlockInfo (line 164) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type StaleDescriptorInfo (line 174) | struct StaleDescriptorInfo
method StaleDescriptorInfo (line 176) | StaleDescriptorInfo(OffsetType offset, SizeType size, uint64_t frame)
class DescriptorAllocator (line 217) | class DescriptorAllocator
type wr (line 215) | namespace wr
class DescriptorAllocatorPage (line 32) | class DescriptorAllocatorPage
type FreeBlockInfo (line 155) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type FreeBlockInfo (line 164) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type StaleDescriptorInfo (line 174) | struct StaleDescriptorInfo
method StaleDescriptorInfo (line 176) | StaleDescriptorInfo(OffsetType offset, SizeType size, uint64_t frame)
class D3D12RenderSystem (line 35) | class D3D12RenderSystem
class DescriptorAllocation (line 42) | class DescriptorAllocation
method DescriptorAllocation (line 57) | DescriptorAllocation(const DescriptorAllocation&) = delete;
method DescriptorAllocation (line 58) | DescriptorAllocation& operator=(const DescriptorAllocation&) = delete;
class DescriptorAllocatorPage (line 96) | class DescriptorAllocatorPage : public std::enable_shared_from_this<De...
type FreeBlockInfo (line 155) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type FreeBlockInfo (line 164) | struct FreeBlockInfo
method FreeBlockInfo (line 166) | FreeBlockInfo(SizeType size)
type StaleDescriptorInfo (line 174) | struct StaleDescriptorInfo
method StaleDescriptorInfo (line 176) | StaleDescriptorInfo(OffsetType offset, SizeType size, uint64_t frame)
class DescriptorAllocator (line 217) | class DescriptorAllocator
FILE: src/d3d12/d3d12_device.cpp
type wr::d3d12 (line 25) | namespace wr::d3d12
type internal (line 30) | namespace internal
function EnableDebugLayer (line 32) | void EnableDebugLayer(Device* device)
function EnableGpuErrorBreaking (line 50) | void EnableGpuErrorBreaking(Device* device)
function GetSysInfo (line 62) | void GetSysInfo(Device* device)
function CreateFactory (line 68) | void CreateFactory(Device* device)
function FindAdapter (line 74) | void FindAdapter(Device* device)
function QueryForOptionalFormats (line 143) | void QueryForOptionalFormats(Device* device)
function IsDXRSupported (line 197) | inline bool IsDXRSupported(IDXGIAdapter1* adapter)
function IsDXRFallbackSupported (line 214) | inline bool IsDXRFallbackSupported(IDXGIAdapter1* adapter)
function EnableDXRFallback (line 226) | inline void EnableDXRFallback()
function SetRaytracingType (line 232) | inline void SetRaytracingType(Device* device)
function Device (line 253) | Device* CreateDevice()
function RaytracingType (line 316) | RaytracingType GetRaytracingType(Device* device)
function Destroy (line 321) | void Destroy(Device* device)
function SetName (line 333) | void SetName(Device * device, std::wstring name)
FILE: src/d3d12/d3d12_dynamic_descriptor_heap.cpp
type wr (line 21) | namespace wr
FILE: src/d3d12/d3d12_dynamic_descriptor_heap.hpp
type wr (line 27) | namespace wr
type d3d12 (line 29) | namespace d3d12
type Device (line 31) | struct Device
class DynamicDescriptorHeap (line 34) | class DynamicDescriptorHeap
type DescriptorTableCache (line 114) | struct DescriptorTableCache
method DescriptorTableCache (line 116) | DescriptorTableCache()
method Reset (line 122) | void Reset()
FILE: src/d3d12/d3d12_enums.hpp
type wr (line 21) | namespace wr
type RaytracingType (line 24) | enum class RaytracingType
type PipelineType (line 31) | enum class PipelineType
type ShaderType (line 37) | enum class ShaderType
type CmdListType (line 48) | enum class CmdListType
type StateObjType (line 56) | enum class StateObjType
type HeapOptimization (line 63) | enum HeapOptimization
type HeapType (line 71) | enum class HeapType
type ResourceType (line 79) | enum class ResourceType
type TopologyType (line 86) | enum class TopologyType
type CullMode (line 94) | enum class CullMode
type TextureFilter (line 101) | enum class TextureFilter
type SRVDimension (line 109) | enum class SRVDimension
type UAVDimension (line 123) | enum class UAVDimension
type TextureAddressMode (line 133) | enum class TextureAddressMode
type BorderColor (line 142) | enum class BorderColor
type DescriptorHeapType (line 149) | enum class DescriptorHeapType
type ResourceState (line 158) | enum class ResourceState
type BufferUsageFlag (line 175) | enum class BufferUsageFlag
type Format (line 181) | enum class Format
function FormatToStr (line 262) | static inline std::string FormatToStr(Format format)
function BitsPerPixel (line 317) | static inline unsigned int BitsPerPixel(Format format)
function BytesPerPixel (line 491) | static inline unsigned int BytesPerPixel(Format format)
FILE: src/d3d12/d3d12_fence.cpp
type wr::d3d12 (line 21) | namespace wr::d3d12
function Fence (line 24) | Fence* CreateFence(Device* device)
function SetName (line 44) | void SetName(Fence * fence, std::wstring name)
function Signal (line 49) | void Signal(Fence* fence, CommandQueue* cmd_queue)
function WaitFor (line 55) | void WaitFor(Fence* fence)
function Destroy (line 70) | void Destroy(Fence* fence)
FILE: src/d3d12/d3d12_functions.hpp
type wr::d3d12 (line 27) | namespace wr::d3d12
type TextureResource (line 29) | struct TextureResource
FILE: src/d3d12/d3d12_heap.cpp
type wr::d3d12 (line 21) | namespace wr::d3d12
type internal (line 24) | namespace internal
function HeapResource (line 248) | HeapResource* AllocConstantBuffer(Heap<HeapOptimization::SMALL_BUFFERS...
function HeapResource (line 302) | HeapResource* AllocConstantBuffer(Heap<HeapOptimization::BIG_BUFFERS>*...
function HeapResource (line 368) | HeapResource* AllocByteAddressBuffer(Heap<HeapOptimization::BIG_BUFFER...
function HeapResource (line 434) | HeapResource* AllocStructuredBuffer(Heap<HeapOptimization::BIG_STATIC_...
function HeapResource (line 499) | HeapResource * AllocGenericBuffer(Heap<HeapOptimization::BIG_STATIC_BU...
function SetName (line 551) | void SetName(Heap<HeapOptimization::SMALL_BUFFERS>* heap, std::wstring...
function SetName (line 556) | void SetName(Heap<HeapOptimization::BIG_BUFFERS>* heap, std::wstring n...
function SetName (line 561) | void SetName(Heap<HeapOptimization::SMALL_STATIC_BUFFERS>* heap, std::...
function SetName (line 566) | void SetName(Heap<HeapOptimization::BIG_STATIC_BUFFERS>* heap, std::ws...
function DeallocConstantBuffer (line 572) | void DeallocConstantBuffer(Heap<HeapOptimization::SMALL_BUFFERS>* heap...
function DeallocConstantBuffer (line 608) | void DeallocConstantBuffer(Heap<HeapOptimization::BIG_BUFFERS>* heap, ...
function DeallocBuffer (line 648) | void DeallocBuffer(Heap<HeapOptimization::BIG_STATIC_BUFFERS>* heap, H...
function MapHeap (line 686) | void MapHeap(Heap<HeapOptimization::SMALL_BUFFERS>* heap)
function MapHeap (line 709) | void MapHeap(Heap<HeapOptimization::BIG_BUFFERS>* heap)
function UnmapHeap (line 727) | void UnmapHeap(Heap<HeapOptimization::SMALL_BUFFERS>* heap)
function UnmapHeap (line 741) | void UnmapHeap(Heap<HeapOptimization::BIG_BUFFERS>* heap)
function MakeResident (line 757) | void MakeResident(Heap<HeapOptimization::SMALL_BUFFERS>* heap)
function MakeResident (line 762) | void MakeResident(Heap<HeapOptimization::BIG_BUFFERS>* heap)
function MakeResident (line 767) | void MakeResident(Heap<HeapOptimization::SMALL_STATIC_BUFFERS>* heap)
function MakeResident (line 772) | void MakeResident(Heap<HeapOptimization::BIG_STATIC_BUFFERS>* heap)
function EnqueueMakeResident (line 777) | void EnqueueMakeResident(Heap<HeapOptimization::SMALL_BUFFERS>* heap, ...
function EnqueueMakeResident (line 782) | void EnqueueMakeResident(Heap<HeapOptimization::BIG_BUFFERS>* heap, Fe...
function EnqueueMakeResident (line 787) | void EnqueueMakeResident(Heap<HeapOptimization::SMALL_STATIC_BUFFERS>*...
function EnqueueMakeResident (line 792) | void EnqueueMakeResident(Heap<HeapOptimization::BIG_STATIC_BUFFERS>* h...
function Evict (line 797) | void Evict(Heap<HeapOptimization::SMALL_BUFFERS>* heap)
function Evict (line 802) | void Evict(Heap<HeapOptimization::BIG_BUFFERS>* heap)
function Evict (line 807) | void Evict(Heap<HeapOptimization::SMALL_STATIC_BUFFERS>* heap)
function Evict (line 812) | void Evict(Heap<HeapOptimization::BIG_STATIC_BUFFERS>* heap)
function Destroy (line 817) | void Destroy(Heap<HeapOptimization::SMALL_BUFFERS>* heap)
function Destroy (line 829) | void Destroy(Heap<HeapOptimization::BIG_BUFFERS>* heap)
function Destroy (line 845) | void Destroy(Heap<HeapOptimization::SMALL_STATIC_BUFFERS>* heap)
function Destroy (line 858) | void Destroy(Heap<HeapOptimization::BIG_STATIC_BUFFERS>* heap)
function UpdateConstantBuffer (line 875) | void UpdateConstantBuffer(HeapResource* buffer, unsigned int frame_idx...
function UpdateStructuredBuffer (line 888) | void UpdateStructuredBuffer(HeapResource * buffer, unsigned int frame_...
function UpdateByteAddressBuffer (line 925) | void UpdateByteAddressBuffer(HeapResource* buffer, unsigned int frame_...
function CreateSRVFromByteAddressBuffer (line 930) | void CreateSRVFromByteAddressBuffer(HeapResource* resource, DescHeapCP...
FILE: src/d3d12/d3d12_indirect_command_buffer.cpp
type wr::d3d12 (line 21) | namespace wr::d3d12
function IndirectCommandBuffer (line 24) | IndirectCommandBuffer* CreateIndirectCommandBuffer(Device* device, std...
function SetName (line 63) | void SetName(IndirectCommandBuffer* buffer, std::wstring name)
function StageBuffer (line 72) | void StageBuffer(CommandList* cmd_list, IndirectCommandBuffer* buffer,...
FILE: src/d3d12/d3d12_material_pool.cpp
type wr (line 18) | namespace wr
FILE: src/d3d12/d3d12_material_pool.hpp
type wr (line 22) | namespace wr
class D3D12MaterialPool (line 25) | class D3D12MaterialPool : public MaterialPool
FILE: src/d3d12/d3d12_model_pool.cpp
type wr (line 24) | namespace wr
FILE: src/d3d12/d3d12_model_pool.hpp
type wr::d3d12 (line 23) | namespace wr::d3d12
type HeapResource (line 25) | struct HeapResource
type StagingBuffer (line 26) | struct StagingBuffer
type wr (line 29) | namespace wr
class D3D12RenderSystem (line 32) | class D3D12RenderSystem
type internal (line 34) | namespace internal
type D3D12MeshInternal (line 36) | struct D3D12MeshInternal : MeshInternal
type CommandType (line 54) | enum CommandType
type Command (line 62) | struct Command
type StageCommand (line 67) | struct StageCommand : Command
type CopyCommand (line 74) | struct CopyCommand : Command
type ReadCommand (line 83) | struct ReadCommand : Command
type TransitionCommand (line 90) | struct TransitionCommand : Command
class D3D12ModelPool (line 98) | class D3D12ModelPool : public ModelPool
method IsUpdated (line 145) | bool IsUpdated() { return m_updated; }
method SetUpdated (line 147) | void SetUpdated(bool updated) { m_updated = updated; }
type MemoryBlock (line 166) | struct MemoryBlock
FILE: src/d3d12/d3d12_pipeline_state.cpp
type wr::d3d12 (line 22) | namespace wr::d3d12
type internal (line 25) | namespace internal
function D3D12_GRAPHICS_PIPELINE_STATE_DESC (line 28) | [[nodiscard]] D3D12_GRAPHICS_PIPELINE_STATE_DESC GetGraphicsPipeline...
function D3D12_COMPUTE_PIPELINE_STATE_DESC (line 83) | [[nodiscard]] D3D12_COMPUTE_PIPELINE_STATE_DESC GetComputePipelineSt...
function PipelineState (line 98) | PipelineState* CreatePipelineState()
function SetName (line 103) | void SetName(PipelineState * pipeline_state, std::wstring name)
function SetVertexShader (line 108) | void SetVertexShader(PipelineState* pipeline_state, Shader* shader)
function SetFragmentShader (line 113) | void SetFragmentShader(PipelineState* pipeline_state, Shader* shader)
function SetComputeShader (line 118) | void SetComputeShader(PipelineState* pipeline_state, Shader* shader)
function SetRootSignature (line 123) | void SetRootSignature(PipelineState* pipeline_state, RootSignature* ro...
function FinalizePipeline (line 128) | void FinalizePipeline(PipelineState* pipeline_state, Device* device, d...
function RefinalizePipeline (line 175) | void RefinalizePipeline(PipelineState* pipeline_state)
function Destroy (line 180) | void Destroy(PipelineState* pipeline_state)
FILE: src/d3d12/d3d12_readback_buffer.cpp
type wr::d3d12 (line 22) | namespace wr::d3d12
function ReadbackBufferResource (line 24) | ReadbackBufferResource* wr::d3d12::CreateReadbackBuffer(Device* device...
function UnmapReadbackBuffer (line 62) | void UnmapReadbackBuffer(ReadbackBufferResource* const readback_buffer)
function SetName (line 71) | void SetName(ReadbackBufferResource* readback_buffer, std::wstring name)
function Destroy (line 76) | void Destroy(ReadbackBufferResource* readback_buffer)
FILE: src/d3d12/d3d12_render_target.cpp
type wr::d3d12 (line 22) | namespace wr::d3d12
function RenderTarget (line 25) | RenderTarget* CreateRenderTarget(Device* device, unsigned int width, u...
function SetName (line 84) | void SetName(RenderTarget* render_target, std::wstring name)
function SetName (line 92) | void SetName(RenderTarget* render_target, std::string name)
function GetRenderTargetWidth (line 97) | unsigned int GetRenderTargetWidth(RenderTarget* render_target)
function GetRenderTargetHeight (line 102) | unsigned int GetRenderTargetHeight(RenderTarget* render_target)
function CreateRenderTargetViews (line 107) | void CreateRenderTargetViews(RenderTarget* render_target, Device* device)
function CreateDepthStencilBuffer (line 133) | void CreateDepthStencilBuffer(RenderTarget* render_target, Device* dev...
function CreateSRVFromDSV (line 174) | void CreateSRVFromDSV(RenderTarget* render_target, DescHeapCPUHandle& ...
function CreateSRVFromRTV (line 191) | void CreateSRVFromRTV(RenderTarget* render_target, DescHeapCPUHandle& ...
function CreateUAVFromRTV (line 211) | void CreateUAVFromRTV(RenderTarget* render_target, DescHeapCPUHandle &...
function CreateSRVFromSpecificRTV (line 230) | void CreateSRVFromSpecificRTV(RenderTarget* render_target, DescHeapCPU...
function CreateUAVFromSpecificRTV (line 247) | void CreateUAVFromSpecificRTV(RenderTarget* render_target, DescHeapCPU...
function Resize (line 263) | void Resize(RenderTarget** render_target, Device* device, unsigned int...
function IncrementFrameIdx (line 270) | void IncrementFrameIdx(RenderTarget* render_target)
function DestroyDepthStencilBuffer (line 275) | void DestroyDepthStencilBuffer(RenderTarget* render_target)
function DestroyRenderTargetViews (line 281) | void DestroyRenderTargetViews(RenderTarget* render_target)
function Destroy (line 291) | void Destroy(RenderTarget* render_target)
FILE: src/d3d12/d3d12_render_window.cpp
type wr::d3d12 (line 21) | namespace wr::d3d12
type internal (line 24) | namespace internal
function DXGI_SWAP_CHAIN_DESC1 (line 26) | inline DXGI_SWAP_CHAIN_DESC1 GetSwapChainDesc(unsigned int width, un...
function EnsureSwapchainColorSpace (line 47) | inline void EnsureSwapchainColorSpace(RenderWindow* render_window, s...
function SetHDRMetaData (line 73) | inline void SetHDRMetaData(RenderWindow* render_window, std::uint32_...
function RenderWindow (line 133) | RenderWindow* CreateRenderWindow(Device* device, HWND window, CommandQ...
function RenderWindow (line 196) | RenderWindow* CreateRenderWindow(Device* device, IUnknown* window, Com...
function Resize (line 232) | void Resize(RenderWindow* render_window, Device* device, unsigned int ...
function Present (line 252) | void Present(RenderWindow* render_window)
function Destroy (line 258) | void Destroy(RenderWindow* render_window)
FILE: src/d3d12/d3d12_renderer.cpp
type wr (line 49) | namespace wr
function CPUTextures (line 179) | CPUTextures D3D12RenderSystem::Render(SceneGraph& scene_graph, FrameGr...
function CommandList (line 370) | CommandList* D3D12RenderSystem::GetDirectCommandList(unsigned int num_...
function CommandList (line 375) | CommandList* D3D12RenderSystem::GetBundleCommandList(unsigned int num_...
function CommandList (line 380) | CommandList* D3D12RenderSystem::GetComputeCommandList(unsigned int num...
function CommandList (line 385) | CommandList* D3D12RenderSystem::GetCopyCommandList(unsigned int num_al...
function RenderTarget (line 400) | RenderTarget* D3D12RenderSystem::GetRenderTarget(RenderTargetPropertie...
type internal (line 887) | namespace internal
function DestroyGenericRegistry (line 891) | void DestroyGenericRegistry()
FILE: src/d3d12/d3d12_renderer.hpp
type wr (line 28) | namespace wr
type d3d12 (line 30) | namespace d3d12
type CommandList (line 32) | struct CommandList
type RenderTarget (line 33) | struct RenderTarget
type MeshNode (line 36) | struct MeshNode
type CameraNode (line 37) | struct CameraNode
type D3D12ConstantBufferHandle (line 38) | struct D3D12ConstantBufferHandle
class D3D12StructuredBufferPool (line 40) | class D3D12StructuredBufferPool
class D3D12ModelPool (line 41) | class D3D12ModelPool
class D3D12TexturePool (line 42) | class D3D12TexturePool
class DynamicDescriptorHeap (line 43) | class DynamicDescriptorHeap
type temp (line 45) | namespace temp
type ProjectionView_CBData (line 47) | struct ProjectionView_CBData
type ShadowDenoiserSettings_CBData (line 70) | struct ShadowDenoiserSettings_CBData
type ReflectionDenoiserSettings_CBData (line 81) | struct ReflectionDenoiserSettings_CBData
type DenoiserCamera_CBData (line 93) | struct DenoiserCamera_CBData
type RTHybridCamera_CBData (line 106) | struct RTHybridCamera_CBData
type RTAO_CBData (line 118) | struct RTAO_CBData
type RayTracingCamera_CBData (line 133) | struct RayTracingCamera_CBData
type RayTracingMaterial_CBData (line 145) | struct RayTracingMaterial_CBData
type RayTracingOffset_CBData (line 158) | struct RayTracingOffset_CBData
class D3D12RenderSystem (line 177) | class D3D12RenderSystem final : public RenderSystem
FILE: src/d3d12/d3d12_resource_pool_texture.cpp
type wr (line 62) | namespace wr
function TextureHandle (line 248) | TextureHandle D3D12TexturePool::CreateCubemap(std::string_view name, u...
function TextureHandle (line 325) | TextureHandle D3D12TexturePool::CreateTexture(std::string_view name, u...
function DescriptorAllocator (line 403) | DescriptorAllocator * D3D12TexturePool::GetAllocator(DescriptorHeapTyp...
function TextureHandle (line 443) | TextureHandle D3D12TexturePool::LoadFromFile(std::string_view path, bo...
function TextureHandle (line 552) | TextureHandle D3D12TexturePool::LoadFromMemory(unsigned char* data, si...
FILE: src/d3d12/d3d12_resource_pool_texture.hpp
type wr (line 51) | namespace wr
type MipMapping_CB (line 53) | struct MipMapping_CB
class D3D12RenderSystem (line 62) | class D3D12RenderSystem
class DescriptorAllocator (line 63) | class DescriptorAllocator
class D3D12TexturePool (line 65) | class D3D12TexturePool : public TexturePool
method DescriptorAllocator (line 93) | DescriptorAllocator* GetMipmappingAllocator() { return m_mipmapping_...
FILE: src/d3d12/d3d12_root_signature.cpp
type wr::d3d12 (line 20) | namespace wr::d3d12
function RootSignature (line 23) | RootSignature* CreateRootSignature(desc::RootSignatureDesc create_info)
function SetName (line 32) | void SetName(RootSignature * root_signature, std::wstring name)
function FinalizeRootSignature (line 37) | void FinalizeRootSignature(RootSignature* root_signature, Device* device)
function RefinalizeRootSignature (line 150) | void RefinalizeRootSignature(RootSignature* root_signature, Device* de...
function Destroy (line 156) | void Destroy(RootSignature* root_signature)
FILE: src/d3d12/d3d12_rt_descriptor_heap.cpp
type wr (line 21) | namespace wr
FILE: src/d3d12/d3d12_rt_descriptor_heap.hpp
type wr (line 27) | namespace wr
type d3d12 (line 29) | namespace d3d12
type Device (line 31) | struct Device
class RTDescriptorHeap (line 34) | class RTDescriptorHeap
type DescriptorTableCache (line 116) | struct DescriptorTableCache
method DescriptorTableCache (line 118) | DescriptorTableCache()
method Reset (line 124) | void Reset()
FILE: src/d3d12/d3d12_settings.hpp
type wr::d3d12::settings (line 24) | namespace wr::d3d12::settings
type DebugLayer (line 27) | enum class DebugLayer
FILE: src/d3d12/d3d12_shader.cpp
type wr::d3d12 (line 25) | namespace wr::d3d12
type internal (line 28) | namespace internal
function ShaderTypeToString (line 31) | std::string ShaderTypeToString(ShaderType type)
function LoadShader (line 65) | std::variant<Shader*, std::string> LoadShader(Device* device, ShaderTy...
function Destroy (line 137) | void Destroy(Shader* shader)
FILE: src/d3d12/d3d12_shader_table.cpp
type wr::d3d12 (line 22) | namespace wr::d3d12
function ShaderRecord (line 25) | ShaderRecord CreateShaderRecord(void* identifier, std::uint64_t identi...
function CopyShaderRecord (line 36) | void CopyShaderRecord(ShaderRecord src, void* dest)
function ShaderTable (line 47) | ShaderTable* CreateShaderTable(Device* device,
function AddShaderRecord (line 80) | void AddShaderRecord(ShaderTable* table, ShaderRecord record)
function Destroy (line 88) | void Destroy(ShaderTable* table)
FILE: src/d3d12/d3d12_staging_buffer.cpp
type wr::d3d12 (line 20) | namespace wr::d3d12
function StagingBuffer (line 23) | StagingBuffer* CreateStagingBuffer(Device* device, void* data, uint64_...
function SetName (line 66) | void SetName(StagingBuffer * buffer, std::wstring name)
function UpdateStagingBuffer (line 72) | void UpdateStagingBuffer(StagingBuffer* buffer, void * data, std::uint...
function StageBuffer (line 77) | void StageBuffer(StagingBuffer* buffer, CommandList* cmd_list)
function StageBufferRegion (line 96) | void StageBufferRegion(StagingBuffer * buffer, std::uint64_t size, std...
function FreeStagingBuffer (line 114) | void FreeStagingBuffer(StagingBuffer* buffer)
function Evict (line 120) | void Evict(StagingBuffer * buffer)
function MakeResident (line 129) | void MakeResident(StagingBuffer * buffer)
function CreateRawSRVFromStagingBuffer (line 138) | void CreateRawSRVFromStagingBuffer(StagingBuffer* buffer, DescHeapCPUH...
function CreateStructuredBufferSRVFromStagingBuffer (line 158) | void CreateStructuredBufferSRVFromStagingBuffer(StagingBuffer* buffer,...
function Destroy (line 180) | void Destroy(StagingBuffer* buffer)
FILE: src/d3d12/d3d12_state_object.cpp
type wr::d3d12 (line 23) | namespace wr::d3d12
function StateObject (line 26) | [[nodiscard]] StateObject* CreateStateObject(Device* device, desc::Sta...
function RecreateStateObject (line 124) | void RecreateStateObject(StateObject* state_object)
function GetShaderIdentifierSize (line 129) | std::uint64_t GetShaderIdentifierSize(Device* device)
function SetGlobalRootSignature (line 145) | void SetGlobalRootSignature(StateObject* state_object, RootSignature* ...
function SetName (line 175) | void SetName(StateObject * obj, std::wstring name)
function Destroy (line 180) | void Destroy(StateObject* obj)
FILE: src/d3d12/d3d12_structs.hpp
type wr (line 35) | namespace wr
class DynamicDescriptorHeap (line 37) | class DynamicDescriptorHeap
class DescriptorAllocation (line 38) | class DescriptorAllocation
class RTDescriptorHeap (line 39) | class RTDescriptorHeap
type wr::d3d12 (line 42) | namespace wr::d3d12
type StagingBuffer (line 46) | struct StagingBuffer
type Shader (line 47) | struct Shader
type RootSignature (line 48) | struct RootSignature
type desc (line 50) | namespace desc
type RenderTargetDesc (line 53) | struct RenderTargetDesc
type TextureDesc (line 63) | struct TextureDesc
type PipelineStateDesc (line 77) | struct PipelineStateDesc
type SamplerDesc (line 92) | struct SamplerDesc
type RootSignatureDesc (line 99) | struct RootSignatureDesc
type DescriptorHeapDesc (line 107) | struct DescriptorHeapDesc
type GeometryDesc (line 115) | struct GeometryDesc
type StateObjectDesc (line 128) | struct StateObjectDesc
type BlasDesc (line 414) | struct BlasDesc
type Device (line 144) | struct Device
method IsFallback (line 167) | bool IsFallback()
type CommandQueue (line 173) | struct CommandQueue
type CommandList (line 178) | struct CommandList
type CommandSignature (line 194) | struct CommandSignature
type RenderTarget (line 199) | struct RenderTarget
type RenderWindow (line 215) | struct RenderWindow : public RenderTarget
type Fence (line 220) | struct Fence
type RootSignature (line 227) | struct RootSignature
type PipelineState (line 237) | struct PipelineState
type StateObject (line 238) | struct StateObject
type Shader (line 239) | struct Shader
type PipelineState (line 248) | struct PipelineState
type Viewport (line 259) | struct Viewport
type DescriptorHeap (line 265) | struct DescriptorHeap
type DescHeapCPUHandle (line 272) | struct DescHeapCPUHandle
type DescHeapGPUHandle (line 277) | struct DescHeapGPUHandle
type StagingBuffer (line 282) | struct StagingBuffer
type ReadbackBufferResource (line 294) | struct ReadbackBufferResource : ReadbackBuffer
type HeapResource (line 299) | struct HeapResource
type detail (line 300) | namespace detail
type Heap (line 305) | struct Heap
type Heap<HeapOptimization::SMALL_BUFFERS> (line 313) | struct Heap<HeapOptimization::SMALL_BUFFERS>
type Heap<HeapOptimization::BIG_BUFFERS> (line 323) | struct Heap<HeapOptimization::BIG_BUFFERS>
type Heap<HeapOptimization::SMALL_STATIC_BUFFERS> (line 330) | struct Heap<HeapOptimization::SMALL_STATIC_BUFFERS>
type Heap<HeapOptimization::BIG_STATIC_BUFFERS> (line 340) | struct Heap<HeapOptimization::BIG_STATIC_BUFFERS>
type Heap (line 351) | struct Heap : detail::Heap<O>
type HeapResource (line 361) | struct HeapResource
type IndirectCommandBuffer (line 382) | struct IndirectCommandBuffer
type StateObject (line 391) | struct StateObject
type AccelerationStructure (line 403) | struct AccelerationStructure
type desc (line 412) | namespace desc
type RenderTargetDesc (line 53) | struct RenderTargetDesc
type TextureDesc (line 63) | struct TextureDesc
type PipelineStateDesc (line 77) | struct PipelineStateDesc
type SamplerDesc (line 92) | struct SamplerDesc
type RootSignatureDesc (line 99) | struct RootSignatureDesc
type DescriptorHeapDesc (line 107) | struct DescriptorHeapDesc
type GeometryDesc (line 115) | struct GeometryDesc
type StateObjectDesc (line 128) | struct StateObjectDesc
type BlasDesc (line 414) | struct BlasDesc
type ShaderRecord (line 422) | struct ShaderRecord
type ShaderTable (line 428) | struct ShaderTable
FILE: src/d3d12/d3d12_structured_buffer.cpp
type wr::d3d12 (line 18) | namespace wr::d3d12
function CreateSRVFromStructuredBuffer (line 21) | void CreateSRVFromStructuredBuffer(HeapResource* structured_buffer, De...
FILE: src/d3d12/d3d12_structured_buffer_pool.cpp
type wr (line 21) | namespace wr
function StructuredBufferHandle (line 103) | StructuredBufferHandle * D3D12StructuredBufferPool::CreateBuffer(std::...
FILE: src/d3d12/d3d12_structured_buffer_pool.hpp
type wr (line 24) | namespace wr
type D3D12StructuredBufferHandle (line 26) | struct D3D12StructuredBufferHandle : StructuredBufferHandle
type BufferUpdateInfo (line 31) | struct BufferUpdateInfo
class D3D12RenderSystem (line 40) | class D3D12RenderSystem
class D3D12StructuredBufferPool (line 42) | class D3D12StructuredBufferPool : public StructuredBufferPool
FILE: src/d3d12/d3d12_texture_resources.hpp
type wr::d3d12 (line 27) | namespace wr::d3d12
type TextureResource (line 29) | struct TextureResource : Texture
FILE: src/d3d12/d3d12_textures.cpp
type wr::d3d12 (line 24) | namespace wr::d3d12
function TextureResource (line 26) | TextureResource* CreateTexture(Device* device, desc::TextureDesc* desc...
function TextureResource (line 109) | TextureResource* CreatePlacedTexture(Device* device, desc::TextureDesc...
function SetName (line 174) | void SetName(TextureResource* tex, std::wstring name)
function CreateSRVFromTexture (line 179) | void CreateSRVFromTexture(TextureResource* tex)
function CreateSRVFromTexture (line 186) | void CreateSRVFromTexture(TextureResource* tex, DescHeapCPUHandle& han...
function CreateSRVFromTexture (line 254) | void CreateSRVFromTexture(TextureResource* tex, DescHeapCPUHandle& han...
function CreateSRVFromCubemapFace (line 328) | void CreateSRVFromCubemapFace(TextureResource* tex, DescHeapCPUHandle&...
function CreateUAVFromTexture (line 360) | void CreateUAVFromTexture(TextureResource* tex, unsigned int mip_slice)
function CreateUAVFromTexture (line 367) | void CreateUAVFromTexture(TextureResource* tex, DescHeapCPUHandle& han...
function CreateUAVFromCubemapFace (line 439) | void CreateUAVFromCubemapFace(TextureResource * tex, DescHeapCPUHandle...
function CreateRTVFromTexture2D (line 464) | void CreateRTVFromTexture2D(TextureResource* tex)
function CreateRTVFromCubemap (line 486) | void CreateRTVFromCubemap(TextureResource* tex)
function SetShaderSRV (line 522) | void SetShaderSRV(wr::d3d12::CommandList* cmd_list, uint32_t rootParam...
function SetShaderSRV (line 529) | void SetShaderSRV(wr::d3d12::CommandList* cmd_list, uint32_t root_para...
function SetShaderUAV (line 534) | void SetShaderUAV(wr::d3d12::CommandList* cmd_list, uint32_t rootParam...
function SetShaderUAV (line 541) | void SetShaderUAV(wr::d3d12::CommandList* cmd_list, uint32_t root_para...
function SetRTShaderSRV (line 546) | void SetRTShaderSRV(wr::d3d12::CommandList* cmd_list, uint32_t rootPar...
function SetRTShaderSRV (line 553) | void SetRTShaderSRV(wr::d3d12::CommandList* cmd_list, uint32_t root_pa...
function SetRTShaderUAV (line 558) | void SetRTShaderUAV(wr::d3d12::CommandList* cmd_list, uint32_t rootPar...
function SetRTShaderUAV (line 565) | void SetRTShaderUAV(wr::d3d12::CommandList* cmd_list, uint32_t root_pa...
function CopyResource (line 570) | void CopyResource(wr::d3d12::CommandList* cmd_list, TextureResource* s...
function Destroy (line 584) | void Destroy(TextureResource* tex)
function CheckUAVCompatibility (line 593) | bool CheckUAVCompatibility(Format format)
function CheckOptionalUAVFormat (line 621) | bool CheckOptionalUAVFormat(Format format)
function CheckBGRFormat (line 656) | bool CheckBGRFormat(Format format)
function CheckSRGBFormat (line 670) | bool CheckSRGBFormat(Format format)
function IsOptionalFormatSupported (line 683) | bool IsOptionalFormatSupported(Device* device, Format format)
function Format (line 688) | Format RemoveSRGB(Format format)
function Format (line 710) | Format BGRtoRGB(Format format)
FILE: src/d3d12/d3d12_viewport.cpp
type wr::d3d12 (line 18) | namespace wr::d3d12
function Viewport (line 21) | Viewport CreateViewport(int width, int height)
function ResizeViewport (line 42) | void ResizeViewport(Viewport& viewport, int width, int height)
FILE: src/d3d12/d3dx12.hpp
type CD3DX12_DEFAULT (line 21) | struct CD3DX12_DEFAULT {}
type CD3DX12_RECT (line 36) | struct CD3DX12_RECT : public D3D12_RECT
method CD3DX12_RECT (line 38) | CD3DX12_RECT() = default;
method CD3DX12_RECT (line 39) | explicit CD3DX12_RECT( const D3D12_RECT& o ) :
method CD3DX12_RECT (line 42) | explicit CD3DX12_RECT(
type CD3DX12_VIEWPORT (line 56) | struct CD3DX12_VIEWPORT : public D3D12_VIEWPORT
method CD3DX12_VIEWPORT (line 58) | CD3DX12_VIEWPORT() = default;
method CD3DX12_VIEWPORT (line 59) | explicit CD3DX12_VIEWPORT( const D3D12_VIEWPORT& o ) :
method CD3DX12_VIEWPORT (line 62) | explicit CD3DX12_VIEWPORT(
method CD3DX12_VIEWPORT (line 77) | explicit CD3DX12_VIEWPORT(
type CD3DX12_BOX (line 118) | struct CD3DX12_BOX : public D3D12_BOX
method CD3DX12_BOX (line 120) | CD3DX12_BOX() = default;
method CD3DX12_BOX (line 121) | explicit CD3DX12_BOX( const D3D12_BOX& o ) :
method CD3DX12_BOX (line 124) | explicit CD3DX12_BOX(
method CD3DX12_BOX (line 135) | explicit CD3DX12_BOX(
method CD3DX12_BOX (line 148) | explicit CD3DX12_BOX(
type CD3DX12_DEPTH_STENCIL_DESC (line 173) | struct CD3DX12_DEPTH_STENCIL_DESC : public D3D12_DEPTH_STENCIL_DESC
method CD3DX12_DEPTH_STENCIL_DESC (line 175) | CD3DX12_DEPTH_STENCIL_DESC() = default;
method CD3DX12_DEPTH_STENCIL_DESC (line 176) | explicit CD3DX12_DEPTH_STENCIL_DESC( const D3D12_DEPTH_STENCIL_DESC& o...
method CD3DX12_DEPTH_STENCIL_DESC (line 179) | explicit CD3DX12_DEPTH_STENCIL_DESC( CD3DX12_DEFAULT )
method CD3DX12_DEPTH_STENCIL_DESC (line 192) | explicit CD3DX12_DEPTH_STENCIL_DESC(
type CD3DX12_DEPTH_STENCIL_DESC1 (line 226) | struct CD3DX12_DEPTH_STENCIL_DESC1 : public D3D12_DEPTH_STENCIL_DESC1
method CD3DX12_DEPTH_STENCIL_DESC1 (line 228) | CD3DX12_DEPTH_STENCIL_DESC1() = default;
method CD3DX12_DEPTH_STENCIL_DESC1 (line 229) | explicit CD3DX12_DEPTH_STENCIL_DESC1( const D3D12_DEPTH_STENCIL_DESC1&...
method CD3DX12_DEPTH_STENCIL_DESC1 (line 232) | explicit CD3DX12_DEPTH_STENCIL_DESC1( const D3D12_DEPTH_STENCIL_DESC& o )
method CD3DX12_DEPTH_STENCIL_DESC1 (line 250) | explicit CD3DX12_DEPTH_STENCIL_DESC1( CD3DX12_DEFAULT )
method CD3DX12_DEPTH_STENCIL_DESC1 (line 264) | explicit CD3DX12_DEPTH_STENCIL_DESC1(
type CD3DX12_BLEND_DESC (line 319) | struct CD3DX12_BLEND_DESC : public D3D12_BLEND_DESC
method CD3DX12_BLEND_DESC (line 321) | CD3DX12_BLEND_DESC() = default;
method CD3DX12_BLEND_DESC (line 322) | explicit CD3DX12_BLEND_DESC( const D3D12_BLEND_DESC& o ) :
method CD3DX12_BLEND_DESC (line 325) | explicit CD3DX12_BLEND_DESC( CD3DX12_DEFAULT )
type CD3DX12_RASTERIZER_DESC (line 343) | struct CD3DX12_RASTERIZER_DESC : public D3D12_RASTERIZER_DESC
method CD3DX12_RASTERIZER_DESC (line 345) | CD3DX12_RASTERIZER_DESC() = default;
method CD3DX12_RASTERIZER_DESC (line 346) | explicit CD3DX12_RASTERIZER_DESC( const D3D12_RASTERIZER_DESC& o ) :
method CD3DX12_RASTERIZER_DESC (line 349) | explicit CD3DX12_RASTERIZER_DESC( CD3DX12_DEFAULT )
method CD3DX12_RASTERIZER_DESC (line 363) | explicit CD3DX12_RASTERIZER_DESC(
type CD3DX12_RESOURCE_ALLOCATION_INFO (line 391) | struct CD3DX12_RESOURCE_ALLOCATION_INFO : public D3D12_RESOURCE_ALLOCATI...
method CD3DX12_RESOURCE_ALLOCATION_INFO (line 393) | CD3DX12_RESOURCE_ALLOCATION_INFO() = default;
method CD3DX12_RESOURCE_ALLOCATION_INFO (line 394) | explicit CD3DX12_RESOURCE_ALLOCATION_INFO( const D3D12_RESOURCE_ALLOCA...
method CD3DX12_RESOURCE_ALLOCATION_INFO (line 397) | CD3DX12_RESOURCE_ALLOCATION_INFO(
type CD3DX12_HEAP_PROPERTIES (line 407) | struct CD3DX12_HEAP_PROPERTIES : public D3D12_HEAP_PROPERTIES
method CD3DX12_HEAP_PROPERTIES (line 409) | CD3DX12_HEAP_PROPERTIES() = default;
method CD3DX12_HEAP_PROPERTIES (line 410) | explicit CD3DX12_HEAP_PROPERTIES(const D3D12_HEAP_PROPERTIES &o) :
method CD3DX12_HEAP_PROPERTIES (line 413) | CD3DX12_HEAP_PROPERTIES(
method CD3DX12_HEAP_PROPERTIES (line 425) | explicit CD3DX12_HEAP_PROPERTIES(
method IsCPUAccessible (line 436) | bool IsCPUAccessible() const
type CD3DX12_HEAP_DESC (line 453) | struct CD3DX12_HEAP_DESC : public D3D12_HEAP_DESC
method CD3DX12_HEAP_DESC (line 455) | CD3DX12_HEAP_DESC() = default;
method CD3DX12_HEAP_DESC (line 456) | explicit CD3DX12_HEAP_DESC(const D3D12_HEAP_DESC &o) :
method CD3DX12_HEAP_DESC (line 459) | CD3DX12_HEAP_DESC(
method CD3DX12_HEAP_DESC (line 470) | CD3DX12_HEAP_DESC(
method CD3DX12_HEAP_DESC (line 481) | CD3DX12_HEAP_DESC(
method CD3DX12_HEAP_DESC (line 493) | CD3DX12_HEAP_DESC(
method CD3DX12_HEAP_DESC (line 503) | CD3DX12_HEAP_DESC(
method CD3DX12_HEAP_DESC (line 513) | CD3DX12_HEAP_DESC(
method IsCPUAccessible (line 524) | bool IsCPUAccessible() const
type CD3DX12_CLEAR_VALUE (line 538) | struct CD3DX12_CLEAR_VALUE : public D3D12_CLEAR_VALUE
method CD3DX12_CLEAR_VALUE (line 540) | CD3DX12_CLEAR_VALUE() = default;
method CD3DX12_CLEAR_VALUE (line 541) | explicit CD3DX12_CLEAR_VALUE(const D3D12_CLEAR_VALUE &o) :
method CD3DX12_CLEAR_VALUE (line 544) | CD3DX12_CLEAR_VALUE(
method CD3DX12_CLEAR_VALUE (line 551) | CD3DX12_CLEAR_VALUE(
type CD3DX12_RANGE (line 564) | struct CD3DX12_RANGE : public D3D12_RANGE
method CD3DX12_RANGE (line 566) | CD3DX12_RANGE() = default;
method CD3DX12_RANGE (line 567) | explicit CD3DX12_RANGE(const D3D12_RANGE &o) :
method CD3DX12_RANGE (line 570) | CD3DX12_RANGE(
type CD3DX12_RANGE_UINT64 (line 580) | struct CD3DX12_RANGE_UINT64 : public D3D12_RANGE_UINT64
method CD3DX12_RANGE_UINT64 (line 582) | CD3DX12_RANGE_UINT64() = default;
method CD3DX12_RANGE_UINT64 (line 583) | explicit CD3DX12_RANGE_UINT64(const D3D12_RANGE_UINT64 &o) :
method CD3DX12_RANGE_UINT64 (line 586) | CD3DX12_RANGE_UINT64(
type CD3DX12_SUBRESOURCE_RANGE_UINT64 (line 596) | struct CD3DX12_SUBRESOURCE_RANGE_UINT64 : public D3D12_SUBRESOURCE_RANGE...
method CD3DX12_SUBRESOURCE_RANGE_UINT64 (line 598) | CD3DX12_SUBRESOURCE_RANGE_UINT64() = default;
method CD3DX12_SUBRESOURCE_RANGE_UINT64 (line 599) | explicit CD3DX12_SUBRESOURCE_RANGE_UINT64(const D3D12_SUBRESOURCE_RANG...
method CD3DX12_SUBRESOURCE_RANGE_UINT64 (line 602) | CD3DX12_SUBRESOURCE_RANGE_UINT64(
method CD3DX12_SUBRESOURCE_RANGE_UINT64 (line 609) | CD3DX12_SUBRESOURCE_RANGE_UINT64(
type CD3DX12_SHADER_BYTECODE (line 621) | struct CD3DX12_SHADER_BYTECODE : public D3D12_SHADER_BYTECODE
method CD3DX12_SHADER_BYTECODE (line 623) | CD3DX12_SHADER_BYTECODE() = default;
method CD3DX12_SHADER_BYTECODE (line 624) | explicit CD3DX12_SHADER_BYTECODE(const D3D12_SHADER_BYTECODE &o) :
method CD3DX12_SHADER_BYTECODE (line 627) | CD3DX12_SHADER_BYTECODE(
method CD3DX12_SHADER_BYTECODE (line 633) | CD3DX12_SHADER_BYTECODE(
type CD3DX12_TILED_RESOURCE_COORDINATE (line 643) | struct CD3DX12_TILED_RESOURCE_COORDINATE : public D3D12_TILED_RESOURCE_C...
method CD3DX12_TILED_RESOURCE_COORDINATE (line 645) | CD3DX12_TILED_RESOURCE_COORDINATE() = default;
method CD3DX12_TILED_RESOURCE_COORDINATE (line 646) | explicit CD3DX12_TILED_RESOURCE_COORDINATE(const D3D12_TILED_RESOURCE_...
method CD3DX12_TILED_RESOURCE_COORDINATE (line 649) | CD3DX12_TILED_RESOURCE_COORDINATE(
type CD3DX12_TILE_REGION_SIZE (line 663) | struct CD3DX12_TILE_REGION_SIZE : public D3D12_TILE_REGION_SIZE
method CD3DX12_TILE_REGION_SIZE (line 665) | CD3DX12_TILE_REGION_SIZE() = default;
method CD3DX12_TILE_REGION_SIZE (line 666) | explicit CD3DX12_TILE_REGION_SIZE(const D3D12_TILE_REGION_SIZE &o) :
method CD3DX12_TILE_REGION_SIZE (line 669) | CD3DX12_TILE_REGION_SIZE(
type CD3DX12_SUBRESOURCE_TILING (line 685) | struct CD3DX12_SUBRESOURCE_TILING : public D3D12_SUBRESOURCE_TILING
method CD3DX12_SUBRESOURCE_TILING (line 687) | CD3DX12_SUBRESOURCE_TILING() = default;
method CD3DX12_SUBRESOURCE_TILING (line 688) | explicit CD3DX12_SUBRESOURCE_TILING(const D3D12_SUBRESOURCE_TILING &o) :
method CD3DX12_SUBRESOURCE_TILING (line 691) | CD3DX12_SUBRESOURCE_TILING(
type CD3DX12_TILE_SHAPE (line 705) | struct CD3DX12_TILE_SHAPE : public D3D12_TILE_SHAPE
method CD3DX12_TILE_SHAPE (line 707) | CD3DX12_TILE_SHAPE() = default;
method CD3DX12_TILE_SHAPE (line 708) | explicit CD3DX12_TILE_SHAPE(const D3D12_TILE_SHAPE &o) :
method CD3DX12_TILE_SHAPE (line 711) | CD3DX12_TILE_SHAPE(
type CD3DX12_RESOURCE_BARRIER (line 723) | struct CD3DX12_RESOURCE_BARRIER : public D3D12_RESOURCE_BARRIER
method CD3DX12_RESOURCE_BARRIER (line 725) | CD3DX12_RESOURCE_BARRIER() = default;
method CD3DX12_RESOURCE_BARRIER (line 726) | explicit CD3DX12_RESOURCE_BARRIER(const D3D12_RESOURCE_BARRIER &o) :
method CD3DX12_RESOURCE_BARRIER (line 729) | static inline CD3DX12_RESOURCE_BARRIER Transition(
method CD3DX12_RESOURCE_BARRIER (line 746) | static inline CD3DX12_RESOURCE_BARRIER Aliasing(
method CD3DX12_RESOURCE_BARRIER (line 757) | static inline CD3DX12_RESOURCE_BARRIER UAV(
type CD3DX12_PACKED_MIP_INFO (line 769) | struct CD3DX12_PACKED_MIP_INFO : public D3D12_PACKED_MIP_INFO
method CD3DX12_PACKED_MIP_INFO (line 771) | CD3DX12_PACKED_MIP_INFO() = default;
method CD3DX12_PACKED_MIP_INFO (line 772) | explicit CD3DX12_PACKED_MIP_INFO(const D3D12_PACKED_MIP_INFO &o) :
method CD3DX12_PACKED_MIP_INFO (line 775) | CD3DX12_PACKED_MIP_INFO(
type CD3DX12_SUBRESOURCE_FOOTPRINT (line 789) | struct CD3DX12_SUBRESOURCE_FOOTPRINT : public D3D12_SUBRESOURCE_FOOTPRINT
method CD3DX12_SUBRESOURCE_FOOTPRINT (line 791) | CD3DX12_SUBRESOURCE_FOOTPRINT() = default;
method CD3DX12_SUBRESOURCE_FOOTPRINT (line 792) | explicit CD3DX12_SUBRESOURCE_FOOTPRINT(const D3D12_SUBRESOURCE_FOOTPRI...
method CD3DX12_SUBRESOURCE_FOOTPRINT (line 795) | CD3DX12_SUBRESOURCE_FOOTPRINT(
method CD3DX12_SUBRESOURCE_FOOTPRINT (line 808) | explicit CD3DX12_SUBRESOURCE_FOOTPRINT(
type CD3DX12_TEXTURE_COPY_LOCATION (line 821) | struct CD3DX12_TEXTURE_COPY_LOCATION : public D3D12_TEXTURE_COPY_LOCATION
method CD3DX12_TEXTURE_COPY_LOCATION (line 823) | CD3DX12_TEXTURE_COPY_LOCATION() = default;
method CD3DX12_TEXTURE_COPY_LOCATION (line 824) | explicit CD3DX12_TEXTURE_COPY_LOCATION(const D3D12_TEXTURE_COPY_LOCATI...
method CD3DX12_TEXTURE_COPY_LOCATION (line 827) | CD3DX12_TEXTURE_COPY_LOCATION(_In_ ID3D12Resource* pRes)
method CD3DX12_TEXTURE_COPY_LOCATION (line 833) | CD3DX12_TEXTURE_COPY_LOCATION(_In_ ID3D12Resource* pRes, D3D12_PLACED_...
method CD3DX12_TEXTURE_COPY_LOCATION (line 839) | CD3DX12_TEXTURE_COPY_LOCATION(_In_ ID3D12Resource* pRes, UINT Sub)
type CD3DX12_DESCRIPTOR_RANGE (line 848) | struct CD3DX12_DESCRIPTOR_RANGE : public D3D12_DESCRIPTOR_RANGE
method CD3DX12_DESCRIPTOR_RANGE (line 850) | CD3DX12_DESCRIPTOR_RANGE() = default;
method CD3DX12_DESCRIPTOR_RANGE (line 851) | explicit CD3DX12_DESCRIPTOR_RANGE(const D3D12_DESCRIPTOR_RANGE &o) :
method CD3DX12_DESCRIPTOR_RANGE (line 854) | CD3DX12_DESCRIPTOR_RANGE(
method Init (line 865) | inline void Init(
method Init (line 876) | static inline void Init(
type CD3DX12_ROOT_DESCRIPTOR_TABLE (line 894) | struct CD3DX12_ROOT_DESCRIPTOR_TABLE : public D3D12_ROOT_DESCRIPTOR_TABLE
method CD3DX12_ROOT_DESCRIPTOR_TABLE (line 896) | CD3DX12_ROOT_DESCRIPTOR_TABLE() = default;
method CD3DX12_ROOT_DESCRIPTOR_TABLE (line 897) | explicit CD3DX12_ROOT_DESCRIPTOR_TABLE(const D3D12_ROOT_DESCRIPTOR_TAB...
method CD3DX12_ROOT_DESCRIPTOR_TABLE (line 900) | CD3DX12_ROOT_DESCRIPTOR_TABLE(
method Init (line 907) | inline void Init(
method Init (line 914) | static inline void Init(
type CD3DX12_ROOT_CONSTANTS (line 925) | struct CD3DX12_ROOT_CONSTANTS : public D3D12_ROOT_CONSTANTS
method CD3DX12_ROOT_CONSTANTS (line 927) | CD3DX12_ROOT_CONSTANTS() = default;
method CD3DX12_ROOT_CONSTANTS (line 928) | explicit CD3DX12_ROOT_CONSTANTS(const D3D12_ROOT_CONSTANTS &o) :
method CD3DX12_ROOT_CONSTANTS (line 931) | CD3DX12_ROOT_CONSTANTS(
method Init (line 939) | inline void Init(
method Init (line 947) | static inline void Init(
type CD3DX12_ROOT_DESCRIPTOR (line 960) | struct CD3DX12_ROOT_DESCRIPTOR : public D3D12_ROOT_DESCRIPTOR
method CD3DX12_ROOT_DESCRIPTOR (line 962) | CD3DX12_ROOT_DESCRIPTOR() = default;
method CD3DX12_ROOT_DESCRIPTOR (line 963) | explicit CD3DX12_ROOT_DESCRIPTOR(const D3D12_ROOT_DESCRIPTOR &o) :
method CD3DX12_ROOT_DESCRIPTOR (line 966) | CD3DX12_ROOT_DESCRIPTOR(
method Init (line 973) | inline void Init(
method Init (line 980) | static inline void Init(_Out_ D3D12_ROOT_DESCRIPTOR &table, UINT shade...
type CD3DX12_ROOT_PARAMETER (line 988) | struct CD3DX12_ROOT_PARAMETER : public D3D12_ROOT_PARAMETER
method CD3DX12_ROOT_PARAMETER (line 990) | CD3DX12_ROOT_PARAMETER() = default;
method CD3DX12_ROOT_PARAMETER (line 991) | explicit CD3DX12_ROOT_PARAMETER(const D3D12_ROOT_PARAMETER &o) :
method InitAsDescriptorTable (line 995) | static inline void InitAsDescriptorTable(
method InitAsConstants (line 1006) | static inline void InitAsConstants(
method InitAsConstantBufferView (line 1018) | static inline void InitAsConstantBufferView(
method InitAsShaderResourceView (line 1029) | static inline void InitAsShaderResourceView(
method InitAsUnorderedAccessView (line 1040) | static inline void InitAsUnorderedAccessView(
method InitAsDescriptorTable (line 1051) | inline void InitAsDescriptorTable(
method InitAsConstants (line 1059) | inline void InitAsConstants(
method InitAsConstantBufferView (line 1068) | inline void InitAsConstantBufferView(
method InitAsShaderResourceView (line 1076) | inline void InitAsShaderResourceView(
method InitAsUnorderedAccessView (line 1084) | inline void InitAsUnorderedAccessView(
type CD3DX12_STATIC_SAMPLER_DESC (line 1094) | struct CD3DX12_STATIC_SAMPLER_DESC : public D3D12_STATIC_SAMPLER_DESC
method CD3DX12_STATIC_SAMPLER_DESC (line 1096) | CD3DX12_STATIC_SAMPLER_DESC() = default;
method CD3DX12_STATIC_SAMPLER_DESC (line 1097) | explicit CD3DX12_STATIC_SAMPLER_DESC(const D3D12_STATIC_SAMPLER_DESC &...
method CD3DX12_STATIC_SAMPLER_DESC (line 1100) | CD3DX12_STATIC_SAMPLER_DESC(
method Init (line 1131) | static inline void Init(
method Init (line 1161) | inline void Init(
type CD3DX12_ROOT_SIGNATURE_DESC (line 1196) | struct CD3DX12_ROOT_SIGNATURE_DESC : public D3D12_ROOT_SIGNATURE_DESC
method CD3DX12_ROOT_SIGNATURE_DESC (line 1198) | CD3DX12_ROOT_SIGNATURE_DESC() = default;
method CD3DX12_ROOT_SIGNATURE_DESC (line 1199) | explicit CD3DX12_ROOT_SIGNATURE_DESC(const D3D12_ROOT_SIGNATURE_DESC &...
method CD3DX12_ROOT_SIGNATURE_DESC (line 1202) | CD3DX12_ROOT_SIGNATURE_DESC(
method CD3DX12_ROOT_SIGNATURE_DESC (line 1211) | CD3DX12_ROOT_SIGNATURE_DESC(CD3DX12_DEFAULT)
method Init (line 1216) | inline void Init(
method Init (line 1226) | static inline void Init(
type CD3DX12_DESCRIPTOR_RANGE1 (line 1243) | struct CD3DX12_DESCRIPTOR_RANGE1 : public D3D12_DESCRIPTOR_RANGE1
method CD3DX12_DESCRIPTOR_RANGE1 (line 1245) | CD3DX12_DESCRIPTOR_RANGE1() = default;
method CD3DX12_DESCRIPTOR_RANGE1 (line 1246) | explicit CD3DX12_DESCRIPTOR_RANGE1(const D3D12_DESCRIPTOR_RANGE1 &o) :
method CD3DX12_DESCRIPTOR_RANGE1 (line 1249) | CD3DX12_DESCRIPTOR_RANGE1(
method Init (line 1261) | inline void Init(
method Init (line 1273) | static inline void Init(
type CD3DX12_ROOT_DESCRIPTOR_TABLE1 (line 1293) | struct CD3DX12_ROOT_DESCRIPTOR_TABLE1 : public D3D12_ROOT_DESCRIPTOR_TABLE1
method CD3DX12_ROOT_DESCRIPTOR_TABLE1 (line 1295) | CD3DX12_ROOT_DESCRIPTOR_TABLE1() = default;
method CD3DX12_ROOT_DESCRIPTOR_TABLE1 (line 1296) | explicit CD3DX12_ROOT_DESCRIPTOR_TABLE1(const D3D12_ROOT_DESCRIPTOR_TA...
method CD3DX12_ROOT_DESCRIPTOR_TABLE1 (line 1299) | CD3DX12_ROOT_DESCRIPTOR_TABLE1(
method Init (line 1306) | inline void Init(
method Init (line 1313) | static inline void Init(
type CD3DX12_ROOT_DESCRIPTOR1 (line 1324) | struct CD3DX12_ROOT_DESCRIPTOR1 : public D3D12_ROOT_DESCRIPTOR1
method CD3DX12_ROOT_DESCRIPTOR1 (line 1326) | CD3DX12_ROOT_DESCRIPTOR1() = default;
method CD3DX12_ROOT_DESCRIPTOR1 (line 1327) | explicit CD3DX12_ROOT_DESCRIPTOR1(const D3D12_ROOT_DESCRIPTOR1 &o) :
method CD3DX12_ROOT_DESCRIPTOR1 (line 1330) | CD3DX12_ROOT_DESCRIPTOR1(
method Init (line 1338) | inline void Init(
method Init (line 1346) | static inline void Init(
type CD3DX12_ROOT_PARAMETER1 (line 1359) | struct CD3DX12_ROOT_PARAMETER1 : public D3D12_ROOT_PARAMETER1
method CD3DX12_ROOT_PARAMETER1 (line 1361) | CD3DX12_ROOT_PARAMETER1() = default;
method CD3DX12_ROOT_PARAMETER1 (line 1362) | explicit CD3DX12_ROOT_PARAMETER1(const D3D12_ROOT_PARAMETER1 &o) :
method InitAsDescriptorTable (line 1366) | static inline void InitAsDescriptorTable(
method InitAsConstants (line 1377) | static inline void InitAsConstants(
method InitAsConstantBufferView (line 1389) | static inline void InitAsConstantBufferView(
method InitAsShaderResourceView (line 1401) | static inline void InitAsShaderResourceView(
method InitAsUnorderedAccessView (line 1413) | static inline void InitAsUnorderedAccessView(
method InitAsDescriptorTable (line 1425) | inline void InitAsDescriptorTable(
method InitAsConstants (line 1433) | inline void InitAsConstants(
method InitAsConstantBufferView (line 1442) | inline void InitAsConstantBufferView(
method InitAsShaderResourceView (line 1451) | inline void InitAsShaderResourceView(
method InitAsUnorderedAccessView (line 1460) | inline void InitAsUnorderedAccessView(
type CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1471) | struct CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC : public D3D12_VERSIONED_RO...
method CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1473) | CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC() = default;
method CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1474) | explicit CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(const D3D12_VERSIONED_R...
method CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1477) | explicit CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(const D3D12_ROOT_SIGNAT...
method CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1482) | explicit CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(const D3D12_ROOT_SIGNAT...
method CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1487) | CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(
method CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1496) | CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(
method CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC (line 1505) | CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(CD3DX12_DEFAULT)
method Init_1_0 (line 1510) | inline void Init_1_0(
method Init_1_0 (line 1520) | static inline void Init_1_0(
method Init_1_1 (line 1536) | inline void Init_1_1(
method Init_1_1 (line 1546) | static inline void Init_1_1(
type CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1564) | struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1566) | CD3DX12_CPU_DESCRIPTOR_HANDLE() = default;
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1567) | explicit CD3DX12_CPU_DESCRIPTOR_HANDLE(const D3D12_CPU_DESCRIPTOR_HAND...
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1570) | CD3DX12_CPU_DESCRIPTOR_HANDLE(CD3DX12_DEFAULT) { ptr = 0; }
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1571) | CD3DX12_CPU_DESCRIPTOR_HANDLE(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &...
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1575) | CD3DX12_CPU_DESCRIPTOR_HANDLE(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &...
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1579) | CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT de...
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1584) | CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
method CD3DX12_CPU_DESCRIPTOR_HANDLE (line 1597) | CD3DX12_CPU_DESCRIPTOR_HANDLE &operator=(const D3D12_CPU_DESCRIPTOR_HA...
method InitOffsetted (line 1603) | inline void InitOffsetted(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base...
method InitOffsetted (line 1608) | inline void InitOffsetted(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base...
method InitOffsetted (line 1613) | static inline void InitOffsetted(_Out_ D3D12_CPU_DESCRIPTOR_HANDLE &ha...
method InitOffsetted (line 1618) | static inline void InitOffsetted(_Out_ D3D12_CPU_DESCRIPTOR_HANDLE &ha...
type CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1625) | struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1627) | CD3DX12_GPU_DESCRIPTOR_HANDLE() = default;
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1628) | explicit CD3DX12_GPU_DESCRIPTOR_HANDLE(const D3D12_GPU_DESCRIPTOR_HAND...
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1631) | CD3DX12_GPU_DESCRIPTOR_HANDLE(CD3DX12_DEFAULT) { ptr = 0; }
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1632) | CD3DX12_GPU_DESCRIPTOR_HANDLE(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &...
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1636) | CD3DX12_GPU_DESCRIPTOR_HANDLE(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &...
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1640) | CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT de...
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1645) | CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
method CD3DX12_GPU_DESCRIPTOR_HANDLE (line 1658) | CD3DX12_GPU_DESCRIPTOR_HANDLE &operator=(const D3D12_GPU_DESCRIPTOR_HA...
method InitOffsetted (line 1664) | inline void InitOffsetted(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base...
method InitOffsetted (line 1669) | inline void InitOffsetted(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base...
method InitOffsetted (line 1674) | static inline void InitOffsetted(_Out_ D3D12_GPU_DESCRIPTOR_HANDLE &ha...
method InitOffsetted (line 1679) | static inline void InitOffsetted(_Out_ D3D12_GPU_DESCRIPTOR_HANDLE &ha...
function UINT (line 1686) | inline UINT D3D12CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT P...
function D3D12DecomposeSubresource (line 1693) | inline void D3D12DecomposeSubresource( UINT Subresource, UINT MipLevels,...
function UINT8 (line 1701) | inline UINT8 D3D12GetFormatPlaneCount(
type CD3DX12_RESOURCE_DESC (line 1715) | struct CD3DX12_RESOURCE_DESC : public D3D12_RESOURCE_DESC
method CD3DX12_RESOURCE_DESC (line 1717) | CD3DX12_RESOURCE_DESC() = default;
method CD3DX12_RESOURCE_DESC (line 1718) | explicit CD3DX12_RESOURCE_DESC( const D3D12_RESOURCE_DESC& o ) :
method CD3DX12_RESOURCE_DESC (line 1721) | CD3DX12_RESOURCE_DESC(
method CD3DX12_RESOURCE_DESC (line 1746) | static inline CD3DX12_RESOURCE_DESC Buffer(
method CD3DX12_RESOURCE_DESC (line 1753) | static inline CD3DX12_RESOURCE_DESC Buffer(
method CD3DX12_RESOURCE_DESC (line 1761) | static inline CD3DX12_RESOURCE_DESC Tex1D(
method CD3DX12_RESOURCE_DESC (line 1773) | static inline CD3DX12_RESOURCE_DESC Tex2D(
method CD3DX12_RESOURCE_DESC (line 1788) | static inline CD3DX12_RESOURCE_DESC Tex3D(
method UINT16 (line 1801) | inline UINT16 Depth() const
method UINT16 (line 1803) | inline UINT16 ArraySize() const
method UINT8 (line 1805) | inline UINT8 PlaneCount(_In_ ID3D12Device* pDevice) const
method UINT (line 1807) | inline UINT Subresources(_In_ ID3D12Device* pDevice) const
method UINT (line 1809) | inline UINT CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT Plane...
type CD3DX12_VIEW_INSTANCING_DESC (line 1830) | struct CD3DX12_VIEW_INSTANCING_DESC : public D3D12_VIEW_INSTANCING_DESC
method CD3DX12_VIEW_INSTANCING_DESC (line 1832) | CD3DX12_VIEW_INSTANCING_DESC() = default;
method CD3DX12_VIEW_INSTANCING_DESC (line 1833) | explicit CD3DX12_VIEW_INSTANCING_DESC( const D3D12_VIEW_INSTANCING_DES...
method CD3DX12_VIEW_INSTANCING_DESC (line 1836) | explicit CD3DX12_VIEW_INSTANCING_DESC( CD3DX12_DEFAULT )
method CD3DX12_VIEW_INSTANCING_DESC (line 1842) | explicit CD3DX12_VIEW_INSTANCING_DESC(
function MemcpySubresource (line 1855) | inline void MemcpySubresource(
function UINT (line 1880) | UINT NumSubresources)
function D3D12IsLayoutOpaque (line 2015) | inline bool D3D12IsLayoutOpaque( D3D12_TEXTURE_LAYOUT Layout )
function ID3D12CommandList (line 2020) | inline ID3D12CommandList * const * CommandListCast(t_CommandListType * c...
function HRESULT (line 2034) | inline HRESULT D3DX12SerializeVersionedRootSignature(
type CD3DX12_RT_FORMAT_ARRAY (line 2150) | struct CD3DX12_RT_FORMAT_ARRAY : public D3D12_RT_FORMAT_ARRAY
method CD3DX12_RT_FORMAT_ARRAY (line 2152) | CD3DX12_RT_FORMAT_ARRAY() = default;
method CD3DX12_RT_FORMAT_ARRAY (line 2153) | explicit CD3DX12_RT_FORMAT_ARRAY(const D3D12_RT_FORMAT_ARRAY& o)
method CD3DX12_RT_FORMAT_ARRAY (line 2156) | explicit CD3DX12_RT_FORMAT_ARRAY(_In_reads_(NumFormats) const DXGI_FOR...
type DefaultSampleMask (line 2171) | struct DefaultSampleMask { operator UINT() { return UINT_MAX; } }
type DefaultSampleDesc (line 2172) | struct DefaultSampleDesc { operator DXGI_SAMPLE_DESC() { return DXGI_SAM...
class CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT (line 2177) | class alignas(void*) CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT
method CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT (line 2183) | CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT() noexcept : _Type(Type), _Inn...
method CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT (line 2184) | CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT(InnerStructType const& i) : _T...
method CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT (line 2185) | CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT& operator=(InnerStructType con...
type ID3DX12PipelineParserCallbacks (line 2217) | struct ID3DX12PipelineParserCallbacks
method FlagsCb (line 2220) | virtual void FlagsCb(D3D12_PIPELINE_STATE_FLAGS) {}
method NodeMaskCb (line 2221) | virtual void NodeMaskCb(UINT) {}
method RootSignatureCb (line 2222) | virtual void RootSignatureCb(ID3D12RootSignature*) {}
method InputLayoutCb (line 2223) | virtual void InputLayoutCb(const D3D12_INPUT_LAYOUT_DESC&) {}
method IBStripCutValueCb (line 2224) | virtual void IBStripCutValueCb(D3D12_INDEX_BUFFER_STRIP_CUT_VALUE) {}
method PrimitiveTopologyTypeCb (line 2225) | virtual void PrimitiveTopologyTypeCb(D3D12_PRIMITIVE_TOPOLOGY_TYPE) {}
method VSCb (line 2226) | virtual void VSCb(const D3D12_SHADER_BYTECODE&) {}
method GSCb (line 2227) | virtual void GSCb(const D3D12_SHADER_BYTECODE&) {}
method StreamOutputCb (line 2228) | virtual void StreamOutputCb(const D3D12_STREAM_OUTPUT_DESC&) {}
method HSCb (line 2229) | virtual void HSCb(const D3D12_SHADER_BYTECODE&) {}
method DSCb (line 2230) | virtual void DSCb(const D3D12_SHADER_BYTECODE&) {}
method PSCb (line 2231) | virtual void PSCb(const D3D12_SHADER_BYTECODE&) {}
method CSCb (line 2232) | virtual void CSCb(const D3D12_SHADER_BYTECODE&) {}
method BlendStateCb (line 2233) | virtual void BlendStateCb(const D3D12_BLEND_DESC&) {}
method DepthStencilStateCb (line 2234) | virtual void DepthStencilStateCb(const D3D12_DEPTH_STENCIL_DESC&) {}
method DepthStencilState1Cb (line 2235) | virtual void DepthStencilState1Cb(const D3D12_DEPTH_STENCIL_DESC1&) {}
method DSVFormatCb (line 2236) | virtual void DSVFormatCb(DXGI_FORMAT) {}
method RasterizerStateCb (line 2237) | virtual void RasterizerStateCb(const D3D12_RASTERIZER_DESC&) {}
method RTVFormatsCb (line 2238) | virtual void RTVFormatsCb(const D3D12_RT_FORMAT_ARRAY&) {}
method SampleDescCb (line 2239) | virtual void SampleDescCb(const DXGI_SAMPLE_DESC&) {}
method SampleMaskCb (line 2240) | virtual void SampleMaskCb(UINT) {}
method ViewInstancingCb (line 2241) | virtual void ViewInstancingCb(const D3D12_VIEW_INSTANCING_DESC&) {}
method CachedPSOCb (line 2242) | virtual void CachedPSOCb(const D3D12_CACHED_PIPELINE_STATE&) {}
method ErrorBadInputParameter (line 2245) | virtual void ErrorBadInputParameter(UINT /*ParameterIndex*/) {}
method ErrorDuplicateSubobject (line 2246) | virtual void ErrorDuplicateSubobject(D3D12_PIPELINE_STATE_SUBOBJECT_TY...
method ErrorUnknownSubobject (line 2247) | virtual void ErrorUnknownSubobject(UINT /*UnknownTypeValue*/) {}
type CD3DX12_PIPELINE_STATE_STREAM1 (line 2254) | struct CD3DX12_PIPELINE_STATE_STREAM1
method CD3DX12_PIPELINE_STATE_STREAM1 (line 2256) | CD3DX12_PIPELINE_STATE_STREAM1() = default;
method CD3DX12_PIPELINE_STATE_STREAM1 (line 2257) | CD3DX12_PIPELINE_STATE_STREAM1(const D3D12_GRAPHICS_PIPELINE_STATE_DES...
method CD3DX12_PIPELINE_STATE_STREAM1 (line 2280) | CD3DX12_PIPELINE_STATE_STREAM1(const D3D12_COMPUTE_PIPELINE_STATE_DESC...
method D3D12_GRAPHICS_PIPELINE_STATE_DESC (line 2311) | D3D12_GRAPHICS_PIPELINE_STATE_DESC GraphicsDescV0() const
method D3D12_COMPUTE_PIPELINE_STATE_DESC (line 2337) | D3D12_COMPUTE_PIPELINE_STATE_DESC ComputeDescV0() const
type CD3DX12_PIPELINE_STATE_STREAM (line 2351) | struct CD3DX12_PIPELINE_STATE_STREAM
method CD3DX12_PIPELINE_STATE_STREAM (line 2353) | CD3DX12_PIPELINE_STATE_STREAM() = default;
method CD3DX12_PIPELINE_STATE_STREAM (line 2354) | CD3DX12_PIPELINE_STATE_STREAM(const D3D12_GRAPHICS_PIPELINE_STATE_DESC...
method CD3DX12_PIPELINE_STATE_STREAM (line 2376) | CD3DX12_PIPELINE_STATE_STREAM(const D3D12_COMPUTE_PIPELINE_STATE_DESC&...
method D3D12_GRAPHICS_PIPELINE_STATE_DESC (line 2404) | D3D12_GRAPHICS_PIPELINE_STATE_DESC GraphicsDescV0() const
method D3D12_COMPUTE_PIPELINE_STATE_DESC (line 2430) | D3D12_COMPUTE_PIPELINE_STATE_DESC ComputeDescV0() const
type CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER (line 2442) | struct CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER : public ID3DX12Pipeli...
method CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER (line 2445) | CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER() noexcept
method FlagsCb (line 2456) | void FlagsCb(D3D12_PIPELINE_STATE_FLAGS Flags) override {PipelineStrea...
method NodeMaskCb (line 2457) | void NodeMaskCb(UINT NodeMask) override {PipelineStream.NodeMask = Nod...
method RootSignatureCb (line 2458) | void RootSignatureCb(ID3D12RootSignature* pRootSignature) override {Pi...
method InputLayoutCb (line 2459) | void InputLayoutCb(const D3D12_INPUT_LAYOUT_DESC& InputLayout) overrid...
method IBStripCutValueCb (line 2460) | void IBStripCutValueCb(D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutVa...
method PrimitiveTopologyTypeCb (line 2461) | void PrimitiveTopologyTypeCb(D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTo...
method VSCb (line 2462) | void VSCb(const D3D12_SHADER_BYTECODE& VS) override {PipelineStream.VS...
method GSCb (line 2463) | void GSCb(const D3D12_SHADER_BYTECODE& GS) override {PipelineStream.GS...
method StreamOutputCb (line 2464) | void StreamOutputCb(const D3D12_STREAM_OUTPUT_DESC& StreamOutput) over...
method HSCb (line 2465) | void HSCb(const D3D12_SHADER_BYTECODE& HS) override {PipelineStream.HS...
method DSCb (line 2466) | void DSCb(const D3D12_SHADER_BYTECODE& DS) override {PipelineStream.DS...
method PSCb (line 2467) | void PSCb(const D3D12_SHADER_BYTECODE& PS) override {PipelineStream.PS...
method CSCb (line 2468) | void CSCb(const D3D12_SHADER_BYTECODE& CS) override {PipelineStream.CS...
method BlendStateCb (line 2469) | void BlendStateCb(const D3D12_BLEND_DESC& BlendState) override {Pipeli...
method DepthStencilStateCb (line 2470) | void DepthStencilStateCb(const D3D12_DEPTH_STENCIL_DESC& DepthStencilS...
method DepthStencilState1Cb (line 2475) | void DepthStencilState1Cb(const D3D12_DEPTH_STENCIL_DESC1& DepthStenci...
method DSVFormatCb (line 2480) | void DSVFormatCb(DXGI_FORMAT DSVFormat) override
method RasterizerStateCb (line 2489) | void RasterizerStateCb(const D3D12_RASTERIZER_DESC& RasterizerState) o...
method RTVFormatsCb (line 2490) | void RTVFormatsCb(const D3D12_RT_FORMAT_ARRAY& RTVFormats) override {P...
method SampleDescCb (line 2491) | void SampleDescCb(const DXGI_SAMPLE_DESC& SampleDesc) override {Pipeli...
method SampleMaskCb (line 2492) | void SampleMaskCb(UINT SampleMask) override {PipelineStream.SampleMask...
method ViewInstancingCb (line 2493) | void ViewInstancingCb(const D3D12_VIEW_INSTANCING_DESC& ViewInstancing...
method CachedPSOCb (line 2494) | void CachedPSOCb(const D3D12_CACHED_PIPELINE_STATE& CachedPSO) overrid...
function D3D12_PIPELINE_STATE_SUBOBJECT_TYPE (line 2500) | inline D3D12_PIPELINE_STATE_SUBOBJECT_TYPE D3DX12GetBaseSubobjectType(D3...
function HRESULT (line 2511) | inline HRESULT D3DX12ParsePipelineStream(const D3D12_PIPELINE_STATE_STRE...
class CD3DX12_STATE_OBJECT_DESC (line 2728) | class CD3DX12_STATE_OBJECT_DESC
method CD3DX12_STATE_OBJECT_DESC (line 2731) | CD3DX12_STATE_OBJECT_DESC()
method CD3DX12_STATE_OBJECT_DESC (line 2738) | CD3DX12_STATE_OBJECT_DESC(D3D12_STATE_OBJECT_TYPE Type)
method SetStateObjectType (line 2742) | void SetStateObjectType(D3D12_STATE_OBJECT_TYPE Type) { m_Desc.Type = ...
method T (line 2810) | T* CreateSubobject()
method D3D12_STATE_SUBOBJECT (line 2818) | D3D12_STATE_SUBOBJECT* TrackSubobject(D3D12_STATE_SUBOBJECT_TYPE Type,...
method Init (line 2828) | void Init(D3D12_STATE_OBJECT_TYPE Type)
type SUBOBJECT_WRAPPER (line 2837) | struct SUBOBJECT_WRAPPER : public D3D12_STATE_SUBOBJECT
class StringContainer (line 2851) | class StringContainer
method LPCWSTR (line 2854) | LPCWSTR LocalCopy(LPCWSTR string, bool bSingleString = false)
method clear (line 2874) | void clear() { m_Strings.clear(); }
class SUBOBJECT_HELPER_BASE (line 2879) | class SUBOBJECT_HELPER_BASE
method SUBOBJECT_HELPER_BASE (line 2882) | SUBOBJECT_HELPER_BASE() { Init(); }
method AddToStateObject (line 2885) | void AddToStateObject(CD3DX12_STATE_OBJECT_DESC& ContainingStateObject)
method Init (line 2891) | void Init() { m_pSubobject = nullptr; }
class OWNED_HELPER (line 2899) | class OWNED_HELPER
method OWNED_HELPER (line 2902) | OWNED_HELPER(const SUBOBJECT_HELPER_BASE* pHelper) { m_pHelper = pHe...
method DeleteHelpers (line 2909) | void DeleteHelpers()
class CD3DX12_DXIL_LIBRARY_SUBOBJECT (line 2933) | class CD3DX12_DXIL_LIBRARY_SUBOBJECT
method CD3DX12_DXIL_LIBRARY_SUBOBJECT (line 2937) | CD3DX12_DXIL_LIBRARY_SUBOBJECT()
method CD3DX12_DXIL_LIBRARY_SUBOBJECT (line 2941) | CD3DX12_DXIL_LIBRARY_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& ContainingSt...
method SetDXILLibrary (line 2946) | void SetDXILLibrary(D3D12_SHADER_BYTECODE*pCode)
method DefineExport (line 2951) | void DefineExport(
method DefineExports (line 2965) | void DefineExports(LPCWSTR(&Exports)[N])
method DefineExports (line 2972) | void DefineExports(LPCWSTR* Exports, UINT N)
method D3D12_STATE_SUBOBJECT_TYPE (line 2979) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 2986) | void Init()
class CD3DX12_EXISTING_COLLECTION_SUBOBJECT (line 3000) | class CD3DX12_EXISTING_COLLECTION_SUBOBJECT
method CD3DX12_EXISTING_COLLECTION_SUBOBJECT (line 3004) | CD3DX12_EXISTING_COLLECTION_SUBOBJECT()
method CD3DX12_EXISTING_COLLECTION_SUBOBJECT (line 3008) | CD3DX12_EXISTING_COLLECTION_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& Conta...
method SetExistingCollection (line 3013) | void SetExistingCollection(ID3D12StateObject*pExistingCollection)
method DefineExport (line 3018) | void DefineExport(
method DefineExports (line 3032) | void DefineExports(LPCWSTR(&Exports)[N])
method DefineExports (line 3039) | void DefineExports(LPCWSTR* Exports, UINT N)
method D3D12_STATE_SUBOBJECT_TYPE (line 3046) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3053) | void Init()
class CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT (line 3069) | class CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT
method CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT (line 3073) | CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT()
method CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT (line 3077) | CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT(CD3DX12_STATE_OBJEC...
method SetSubobjectToAssociate (line 3082) | void SetSubobjectToAssociate(const D3D12_STATE_SUBOBJECT& SubobjectToA...
method AddExport (line 3086) | void AddExport(LPCWSTR Export)
method AddExports (line 3093) | void AddExports(LPCWSTR (&Exports)[N])
method AddExports (line 3100) | void AddExports(LPCWSTR* Exports, UINT N)
method D3D12_STATE_SUBOBJECT_TYPE (line 3107) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3114) | void Init()
class CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION (line 3128) | class CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION
method CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION (line 3132) | CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION()
method CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION (line 3136) | CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION(CD3DX12_STATE_OBJECT_DES...
method SetSubobjectNameToAssociate (line 3141) | void SetSubobjectNameToAssociate(LPCWSTR SubobjectToAssociate)
method AddExport (line 3145) | void AddExport(LPCWSTR Export)
method AddExports (line 3152) | void AddExports(LPCWSTR (&Exports)[N])
method AddExports (line 3159) | void AddExports(LPCWSTR* Exports, UINT N)
method D3D12_STATE_SUBOBJECT_TYPE (line 3166) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3173) | void Init()
class CD3DX12_HIT_GROUP_SUBOBJECT (line 3189) | class CD3DX12_HIT_GROUP_SUBOBJECT
method CD3DX12_HIT_GROUP_SUBOBJECT (line 3193) | CD3DX12_HIT_GROUP_SUBOBJECT()
method CD3DX12_HIT_GROUP_SUBOBJECT (line 3197) | CD3DX12_HIT_GROUP_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& ContainingState...
method SetHitGroupExport (line 3202) | void SetHitGroupExport(LPCWSTR exportName)
method SetHitGroupType (line 3206) | void SetHitGroupType(D3D12_HIT_GROUP_TYPE Type) { m_Desc.Type = Type; }
method SetAnyHitShaderImport (line 3207) | void SetAnyHitShaderImport(LPCWSTR importName)
method SetClosestHitShaderImport (line 3211) | void SetClosestHitShaderImport(LPCWSTR importName)
method SetIntersectionShaderImport (line 3215) | void SetIntersectionShaderImport(LPCWSTR importName)
method D3D12_STATE_SUBOBJECT_TYPE (line 3219) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3226) | void Init()
class CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT (line 3243) | class CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT
method CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT (line 3247) | CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT()
method CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT (line 3251) | CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& ...
method Config (line 3256) | void Config(UINT MaxPayloadSizeInBytes, UINT MaxAttributeSizeInBytes)
method D3D12_STATE_SUBOBJECT_TYPE (line 3261) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3268) | void Init()
class CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT (line 3278) | class CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT
method CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT (line 3282) | CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT()
method CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT (line 3286) | CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC...
method Config (line 3291) | void Config(UINT MaxTraceRecursionDepth)
method D3D12_STATE_SUBOBJECT_TYPE (line 3295) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3302) | void Init()
class CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT (line 3312) | class CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT
method CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT (line 3316) | CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT()
method CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT (line 3320) | CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& Con...
method SetRootSignature (line 3325) | void SetRootSignature(ID3D12RootSignature* pRootSig)
method D3D12_STATE_SUBOBJECT_TYPE (line 3329) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3336) | void Init()
class CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT (line 3346) | class CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT
method CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT (line 3350) | CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT()
method CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT (line 3354) | CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& Cont...
method SetRootSignature (line 3359) | void SetRootSignature(ID3D12RootSignature* pRootSig)
method D3D12_STATE_SUBOBJECT_TYPE (line 3363) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3370) | void Init()
class CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT (line 3380) | class CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT
method CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT (line 3384) | CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT()
method CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT (line 3388) | CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& Conta...
method SetFlags (line 3393) | void SetFlags(D3D12_STATE_OBJECT_FLAGS Flags)
method D3D12_STATE_SUBOBJECT_TYPE (line 3397) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3404) | void Init()
class CD3DX12_NODE_MASK_SUBOBJECT (line 3414) | class CD3DX12_NODE_MASK_SUBOBJECT
method CD3DX12_NODE_MASK_SUBOBJECT (line 3418) | CD3DX12_NODE_MASK_SUBOBJECT()
method CD3DX12_NODE_MASK_SUBOBJECT (line 3422) | CD3DX12_NODE_MASK_SUBOBJECT(CD3DX12_STATE_OBJECT_DESC& ContainingState...
method SetNodeMask (line 3427) | void SetNodeMask(UINT NodeMask)
method D3D12_STATE_SUBOBJECT_TYPE (line 3431) | D3D12_STATE_SUBOBJECT_TYPE Type() const
method Init (line 3438) | void Init()
FILE: src/engine_registry.cpp
type wr (line 39) | namespace wr
FILE: src/engine_registry.hpp
type wr (line 26) | namespace wr
type rs_layout (line 29) | namespace rs_layout
type Type (line 32) | enum class Type
type Entry (line 42) | struct Entry
function GetStart (line 50) | constexpr unsigned int GetStart(const T data, const E name)
function GetHeapLoc (line 83) | constexpr unsigned int GetHeapLoc(const T data, const E name)
function GetSize (line 105) | constexpr unsigned int GetSize(const T data, const E name)
function CD3DX12_DESCRIPTOR_RANGE (line 120) | constexpr CD3DX12_DESCRIPTOR_RANGE GetRange(const T data, const Type...
function CD3DX12_ROOT_PARAMETER (line 187) | constexpr CD3DX12_ROOT_PARAMETER GetCBV(const T data, const E name, ...
function CD3DX12_ROOT_PARAMETER (line 212) | constexpr CD3DX12_ROOT_PARAMETER GetSRV(const T data, const E name, ...
function CD3DX12_ROOT_PARAMETER (line 237) | constexpr CD3DX12_ROOT_PARAMETER GetConstants(const T data, const E ...
type params (line 265) | namespace params
type BRDF_LutE (line 267) | enum class BRDF_LutE
type DeferredMainE (line 277) | enum class DeferredMainE
type SVGFDenoiserE (line 302) | enum class SVGFDenoiserE
type DeferredCompositionE (line 351) | enum class DeferredCompositionE
type MipMappingE (line 388) | enum class MipMappingE
type CubemapConversionE (line 401) | enum class CubemapConversionE
type CubemapConvolutionE (line 414) | enum class CubemapConvolutionE
type CubemapPrefilteringE (line 427) | enum class CubemapPrefilteringE
type PostProcessingE (line 440) | enum class PostProcessingE
type AccumulationE (line 453) | enum class AccumulationE
type FullRaytracingE (line 466) | enum class FullRaytracingE
type RTHybridE (line 499) | enum class RTHybridE
type SpatialReconstructionE (line 536) | enum class SpatialReconstructionE
type ReflectionDenoiserE (line 551) | enum class ReflectionDenoiserE
type RTAOE (line 604) | enum class RTAOE
type PathTracingE (line 621) | enum class PathTracingE
type DoFCoCE (line 658) | enum class DoFCoCE
type DoFNearMaskE (line 671) | enum class DoFNearMaskE
type DownScaleE (line 683) | enum class DownScaleE
type DoFDilateE (line 700) | enum class DoFDilateE
type DoFBokehE (line 711) | enum class DoFBokehE
type DoFBokehPostFilterE (line 730) | enum class DoFBokehPostFilterE
type DoFCompositionE (line 745) | enum class DoFCompositionE
type BloomExtractBrightE (line 762) | enum class BloomExtractBrightE
type BloomBlurE (line 776) | enum class BloomBlurE
type BloomBlurHorizontalE (line 789) | enum class BloomBlurHorizontalE
type BloomBlurVerticalE (line 804) | enum class BloomBlurVerticalE
type BloomCompositionE (line 821) | enum class BloomCompositionE
type root_signatures (line 840) | struct root_signatures
type shaders (line 872) | struct shaders
type pipelines (line 914) | struct pipelines
type state_objects (line 947) | struct state_objects
FILE: src/frame_graph/frame_graph.hpp
function FG_DEPS (line 40) | std::vector<std::reference_wrapper<const std::type_info>> FG_DEPS() {
type wr (line 44) | namespace wr
type RenderTaskType (line 46) | enum class RenderTaskType
type CPUTextureType (line 53) | enum class CPUTextureType
type CPUTextures (line 59) | struct CPUTextures
class FrameGraph (line 69) | class FrameGraph
method FrameGraph (line 117) | FrameGraph(std::size_t num_reserved_tasks = 1) :
method FrameGraph (line 155) | FrameGraph(const FrameGraph&) = delete;
method FrameGraph (line 156) | FrameGraph(FrameGraph&&) = delete;
method FrameGraph (line 158) | FrameGraph& operator=(const FrameGraph&) = delete;
method FrameGraph (line 159) | FrameGraph& operator=(FrameGraph&&) = delete;
method Setup (line 167) | inline void Setup(RenderSystem& render_system)
method Execute (line 260) | inline void Execute(SceneGraph& scene_graph)
method Resize (line 288) | inline void Resize(std::uint32_t width, std::uint32_t height)
method GetRenderTargetResolutionScale (line 318) | [[nodiscard]] inline const float GetRenderTargetResolutionScale(Rend...
method Destroy (line 335) | void Destroy()
method WaitForCompletion (line 391) | inline void WaitForCompletion(RenderTaskHandle handle)
method WaitForPredecessorTask (line 411) | inline void WaitForPredecessorTask()
method RenderTarget (line 487) | [[nodiscard]] inline RenderTarget* GetPredecessorRenderTarget()
method GetCommandList (line 514) | [[nodiscard]] inline auto GetCommandList(RenderTaskHandle handle) const
method GetAllCommandLists (line 553) | [[nodiscard]] std::vector<T*> GetAllCommandLists()
method GetRenderTarget (line 580) | [[nodiscard]] inline auto GetRenderTarget(RenderTaskHandle handle) c...
method HasTask (line 595) | inline bool HasTask() const
method Validate (line 605) | bool Validate()
method AddTask (line 648) | inline void AddTask(RenderTaskDesc& desc, std::wstring const & name,...
method GetUID (line 689) | [[nodiscard]] const std::uint64_t GetUID() const noexcept
method CPUTextures (line 695) | [[nodiscard]] CPUTextures const & GetOutputTexture() const noexcept
method SaveTaskToDisc (line 706) | void SaveTaskToDisc(std::string const & path, int index = 0)
method SetOutputTexture (line 721) | void SetOutputTexture(const CPUTexture& output_texture, CPUTextureTy...
method SetShouldExecute (line 751) | inline void SetShouldExecute(RenderTaskHandle handle, bool value)
method SetShouldExecute (line 758) | inline void SetShouldExecute(bool value)
method UpdateSettings (line 779) | inline void UpdateSettings(std::any settings)
method R (line 803) | [[nodiscard]] inline R GetSettings() const try
method T (line 833) | [[nodiscard]] inline T GetSettings(RenderTaskHandle handle) const try
method ResetOutputTexture (line 848) | inline void ResetOutputTexture()
method GetHandleFromType (line 860) | inline std::optional<RenderTaskHandle> GetHandleFromType() const
method Setup_MT_Impl (line 874) | inline void Setup_MT_Impl()
method Execute_MT_Impl (line 893) | inline void Execute_MT_Impl(SceneGraph& scene_graph)
method Execute_ST_Impl (line 924) | inline void Execute_ST_Impl(SceneGraph& scene_graph)
method ExecuteSingleTask (line 939) | inline void ExecuteSingleTask(SceneGraph& sg, RenderTaskHandle handle)
method GetFreeUID (line 988) | static std::uint64_t GetFreeUID()
method WISPRENDERER_EXPORT (line 1002) | WISPRENDERER_EXPORT static void ReleaseUID(std::uint64_t uid)
type RenderTaskDesc (line 75) | struct RenderTaskDesc
class FrameGraph (line 103) | class FrameGraph
method FrameGraph (line 117) | FrameGraph(std::size_t num_reserved_tasks = 1) :
method FrameGraph (line 155) | FrameGraph(const FrameGraph&) = delete;
method FrameGraph (line 156) | FrameGraph(FrameGraph&&) = delete;
method FrameGraph (line 158) | FrameGraph& operator=(const FrameGraph&) = delete;
method FrameGraph (line 159) | FrameGraph& operator=(FrameGraph&&) = delete;
method Setup (line 167) | inline void Setup(RenderSystem& render_system)
method Execute (line 260) | inline void Execute(SceneGraph& scene_graph)
method Resize (line 288) | inline void Resize(std::uint32_t width, std::uint32_t height)
method GetRenderTargetResolutionScale (line 318) | [[nodiscard]] inline const float GetRenderTargetResolutionScale(Rend...
method Destroy (line 335) | void Destroy()
method WaitForCompletion (line 391) | inline void WaitForCompletion(RenderTaskHandle handle)
method WaitForPredecessorTask (line 411) | inline void WaitForPredecessorTask()
method RenderTarget (line 487) | [[nodiscard]] inline RenderTarget* GetPredecessorRenderTarget()
method GetCommandList (line 514) | [[nodiscard]] inline auto GetCommandList(RenderTaskHandle handle) const
method GetAllCommandLists (line 553) | [[nodiscard]] std::vector<T*> GetAllCommandLists()
method GetRenderTarget (line 580) | [[nodiscard]] inline auto GetRenderTarget(RenderTaskHandle handle) c...
method HasTask (line 595) | inline bool HasTask() const
method Validate (line 605) | bool Validate()
method AddTask (line 648) | inline void AddTask(RenderTaskDesc& desc, std::wstring const & name,...
method GetUID (line 689) | [[nodiscard]] const std::uint64_t GetUID() const noexcept
method CPUTextures (line 695) | [[nodiscard]] CPUTextures const & GetOutputTexture() const noexcept
method SaveTaskToDisc (line 706) | void SaveTaskToDisc(std::string const & path, int index = 0)
method SetOutputTexture (line 721) | void SetOutputTexture(const CPUTexture& output_texture, CPUTextureTy...
method SetShouldExecute (line 751) | inline void SetShouldExecute(RenderTaskHandle handle, bool value)
method SetShouldExecute (line 758) | inline void SetShouldExecute(bool value)
method UpdateSettings (line 779) | inline void UpdateSettings(std::any settings)
method R (line 803) | [[nodiscard]] inline R GetSettings() const try
method T (line 833) | [[nodiscard]] inline T GetSettings(RenderTaskHandle handle) const try
method ResetOutputTexture (line 848) | inline void ResetOutputTexture()
method GetHandleFromType (line 860) | inline std::optional<RenderTaskHandle> GetHandleFromType() const
method Setup_MT_Impl (line 874) | inline void Setup_MT_Impl()
method Execute_MT_Impl (line 893) | inline void Execute_MT_Impl(SceneGraph& scene_graph)
method Execute_ST_Impl (line 924) | inline void Execute_ST_Impl(SceneGraph& scene_graph)
method ExecuteSingleTask (line 939) | inline void ExecuteSingleTask(SceneGraph& sg, RenderTaskHandle handle)
method GetFreeUID (line 988) | static std::uint64_t GetFreeUID()
method WISPRENDERER_EXPORT (line 1002) | WISPRENDERER_EXPORT static void ReleaseUID(std::uint64_t uid)
FILE: src/id_factory.cpp
type wr (line 18) | namespace wr
FILE: src/id_factory.hpp
type wr (line 20) | namespace wr
class IDFactory (line 23) | class IDFactory
method IDFactory (line 30) | IDFactory(IDFactory const &) = delete;
method IDFactory (line 31) | IDFactory& operator=(IDFactory const &) = delete;
method IDFactory (line 32) | IDFactory(IDFactory&&) = delete;
method IDFactory (line 33) | IDFactory& operator=(IDFactory&&) = delete;
FILE: src/imgui/ImGuizmo.cpp
type ImGuizmo (line 33) | namespace ImGuizmo
function FPU_MatrixF_x_MatrixF (line 44) | void FPU_MatrixF_x_MatrixF(const float *a, const float *b, float *r)
function T (line 68) | T Clamp(T x, T y, T z) { return ((x<y) ? y : ((x>z) ? z : x)); }
function T (line 69) | T max(T x, T y) { return (x > y) ? x : y; }
function T (line 70) | T min(T x, T y) { return (x < y) ? x : y; }
function IsWithin (line 71) | bool IsWithin(T x, T y, T z) { return (x>=y) && (x<=z); }
type matrix_t (line 73) | struct matrix_t
method matrix_t (line 198) | matrix_t(const matrix_t& other) { memcpy(&m16[0], &other.m16[0], siz...
method matrix_t (line 199) | matrix_t() {}
method Translation (line 203) | void Translation(float _x, float _y, float _z) { this->Translation(m...
method Translation (line 205) | void Translation(const vec_t& vt)
method Scale (line 213) | void Scale(float _x, float _y, float _z)
method Scale (line 220) | void Scale(const vec_t& s) { Scale(s.x, s.y, s.z); }
method matrix_t (line 222) | matrix_t& operator *= (const matrix_t& mat)
method matrix_t (line 230) | matrix_t operator * (const matrix_t& mat) const
method Multiply (line 237) | void Multiply(const matrix_t &matrix)
method Multiply (line 245) | void Multiply(const matrix_t &m1, const matrix_t &m2)
method GetDeterminant (line 250) | float GetDeterminant() const
method SetToIdentity (line 257) | void SetToIdentity()
method Transpose (line 264) | void Transpose()
method OrthoNormalize (line 279) | void OrthoNormalize()
type vec_t (line 74) | struct vec_t
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 147) | vec_t makeVect(float _x, float _y, float _z = 0.f, float _w = 0.f) { v...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 148) | vec_t makeVect(ImVec2 v) { vec_t res; res.x = v.x; res.y = v.y; res.z ...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 149) | vec_t vec_t::operator * (float f) const { return makeVect(x * f, y * f...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 150) | vec_t vec_t::operator - () const { return makeVect(-x, -y, -z, -w); }
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 151) | vec_t vec_t::operator - (const vec_t& v) const { return makeVect(x - v...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 152) | vec_t vec_t::operator + (const vec_t& v) const { return makeVect(x + v...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 153) | vec_t vec_t::operator * (const vec_t& v) const { return makeVect(x * v...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 154) | vec_t vec_t::Abs() const { return makeVect(fabsf(x), fabsf(y), fabsf(z...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 156) | vec_t Normalized(const vec_t& v) { vec_t res; res = v; res.Normalize()...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function vec_t (line 157) | vec_t Cross(const vec_t& v1, const vec_t& v2)
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function Dot (line 167) | float Dot(const vec_t &v1, const vec_t &v2)
function vec_t (line 172) | vec_t BuildPlan(const vec_t & p_point1, const vec_t & p_normal)
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
type matrix_t (line 183) | struct matrix_t
method matrix_t (line 198) | matrix_t(const matrix_t& other) { memcpy(&m16[0], &other.m16[0], siz...
method matrix_t (line 199) | matrix_t() {}
method Translation (line 203) | void Translation(float _x, float _y, float _z) { this->Translation(m...
method Translation (line 205) | void Translation(const vec_t& vt)
method Scale (line 213) | void Scale(float _x, float _y, float _z)
method Scale (line 220) | void Scale(const vec_t& s) { Scale(s.x, s.y, s.z); }
method matrix_t (line 222) | matrix_t& operator *= (const matrix_t& mat)
method matrix_t (line 230) | matrix_t operator * (const matrix_t& mat) const
method Multiply (line 237) | void Multiply(const matrix_t &matrix)
method Multiply (line 245) | void Multiply(const matrix_t &m1, const matrix_t &m2)
method GetDeterminant (line 250) | float GetDeterminant() const
method SetToIdentity (line 257) | void SetToIdentity()
method Transpose (line 264) | void Transpose()
method OrthoNormalize (line 279) | void OrthoNormalize()
type MOVETYPE (line 480) | enum MOVETYPE
type Context (line 500) | struct Context
method Context (line 502) | Context() : mbUsing(false), mbEnable(true), mbUsingBounds(false)
function ImVec2 (line 613) | static ImVec2 worldToPos(const vec_t& worldPos, const matrix_t& mat)
function ComputeCameraRay (line 627) | static void ComputeCameraRay(vec_t &rayOrigin, vec_t &rayDir)
function GetSegmentLengthClipSpace (line 645) | static float GetSegmentLengthClipSpace(const vec_t& start, const vec_t...
function GetParallelogram (line 663) | static float GetParallelogram(const vec_t& ptO, const vec_t& ptA, cons...
function vec_t (line 683) | inline vec_t PointOnSegment(const vec_t & point, const vec_t & vertPos...
method Lerp (line 79) | void Lerp(const vec_t& v, float t)
method Set (line 87) | void Set(float v) { x = y = z = w = v; }
method Set (line 88) | void Set(float _x, float _y, float _z = 0.f, float _w = 0.f) { x = _...
method vec_t (line 90) | vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; ...
method vec_t (line 91) | vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; ...
method vec_t (line 92) | vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; ...
method vec_t (line 93) | vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *=...
method vec_t (line 101) | const vec_t& operator + () const { return (*this); }
method Length (line 102) | float Length() const { return sqrtf(x*x + y*y + z*z); }
method LengthSq (line 103) | float LengthSq() const { return (x*x + y*y + z*z); }
method vec_t (line 104) | vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); }
method vec_t (line 105) | vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); thi...
method Cross (line 107) | void Cross(const vec_t& v)
method Cross (line 119) | void Cross(const vec_t& v1, const vec_t& v2)
method Dot (line 126) | float Dot(const vec_t &v) const
method Dot3 (line 130) | float Dot3(const vec_t &v) const
method TransformVector (line 140) | void TransformVector(const vec_t& v, const matrix_t& matrix) { (*thi...
method TransformPoint (line 141) | void TransformPoint(const vec_t& v, const matrix_t& matrix) { (*this...
function IntersectRayPlane (line 701) | static float IntersectRayPlane(const vec_t & rOrigin, const vec_t& rVe...
function IsInContextRect (line 712) | static bool IsInContextRect( ImVec2 p )
function SetRect (line 717) | void SetRect(float x, float y, float width, float height)
function IMGUI_API (line 728) | IMGUI_API void SetOrthographic(bool isOrthographic)
function SetDrawlist (line 733) | void SetDrawlist()
function BeginFrame (line 738) | void BeginFrame()
function IsUsing (line 757) | bool IsUsing()
function IsOver (line 762) | bool IsOver()
function Enable (line 767) | void Enable(bool enable)
function ComputeContext (line 777) | static void ComputeContext(const float *view, const float *projection,...
function ComputeColors (line 825) | static void ComputeColors(ImU32 *colors, int type, OPERATION operation)
function ComputeTripodAxisAndVisibility (line 861) | static void ComputeTripodAxisAndVisibility(int axisIndex, vec_t& dirAx...
function ComputeSnap (line 912) | static void ComputeSnap(float*value, float snap)
function ComputeSnap (line 923) | static void ComputeSnap(vec_t& value, float *snap)
function ComputeAngleOnPlan (line 931) | static float ComputeAngleOnPlan()
function DrawRotationGizmo (line 945) | static void DrawRotationGizmo(int type)
function DrawHatchedAxis (line 1017) | static void DrawHatchedAxis(const vec_t& axis)
function DrawScaleGizmo (line 1027) | static void DrawScaleGizmo(int type)
function DrawTranslationGizmo (line 1092) | static void DrawTranslationGizmo(int type)
function CanActivate (line 1172) | static bool CanActivate()
function HandleAndDrawLocalBounds (line 1179) | static void HandleAndDrawLocalBounds(float *bounds, matrix_t *matrix, ...
function GetScaleType (line 1424) | static int GetScaleType()
function GetRotateType (line 1460) | static int GetRotateType()
function GetMoveType (line 1497) | static int GetMoveType(vec_t *gizmoHitProportion)
function HandleTranslation (line 1540) | static void HandleTranslation(float *matrix, float *deltaMatrix, int& ...
function HandleScale (line 1639) | static void HandleScale(float *matrix, float *deltaMatrix, int& type, ...
function HandleRotation (line 1727) | static void HandleRotation(float *matrix, float *deltaMatrix, int& typ...
function DecomposeMatrixToComponents (line 1815) | void DecomposeMatrixToComponents(const float *matrix, float *translati...
function RecomposeMatrixFromComponents (line 1834) | void RecomposeMatrixFromComponents(const float *translation, const flo...
function Manipulate (line 1858) | void Manipulate(const float *view, const float *projection, OPERATION ...
function DrawCube (line 1917) | void DrawCube(const float *view, const float *projection, const float ...
function DrawGrid (line 1970) | void DrawGrid(const float *view, const float *projection, const float ...
FILE: src/imgui/ImGuizmo.h
function EditTransform (line 45) | void EditTransform(const Camera& camera, matrix_t& matrix)
function namespace (line 113) | namespace ImGuizmo
FILE: src/imgui/imgui.cpp
type ImGui (line 1070) | namespace ImGui
function DockNodeGetDepth (line 11002) | static int DockNodeGetDepth(const ImGuiDockNode* node) { ...
function FreeWrapper (line 1136) | static void FreeWrapper(void* ptr, void* user_data) { IM_UNUSE...
function FreeWrapper (line 1139) | static void FreeWrapper(void* ptr, void* user_data) { IM_UNUSE...
function ImVec2 (line 1313) | ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2...
function ImTriangleContainsPoint (line 1326) | bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImV...
function ImTriangleBarycentricCoords (line 1334) | void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const...
function ImVec2 (line 1345) | ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const Im...
function ImStricmp (line 1362) | int ImStricmp(const char* str1, const char* str2)
function ImStrnicmp (line 1369) | int ImStrnicmp(const char* str1, const char* str2, size_t count)
function ImStrncpy (line 1376) | void ImStrncpy(char* dst, const char* src, size_t count)
function ImStrlenW (line 1412) | int ImStrlenW(const ImWchar* str)
function ImWchar (line 1427) | const ImWchar* ImStrbolW(const ImWchar* buf_mid_line, const ImWchar* buf...
function ImStrTrimBlanks (line 1457) | void ImStrTrimBlanks(char* buf)
function ImFormatString (line 1494) | int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
function ImFormatStringV (line 1512) | int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list...
function ImU32 (line 1554) | ImU32 ImHashData(const void* data_p, size_t data_size, ImU32 seed)
function ImU32 (line 1570) | ImU32 ImHashStr(const char* data_p, size_t data_size, ImU32 seed)
function FILE (line 1598) | FILE* ImFileOpen(const char* filename, const char* mode)
function ImTextCharFromUtf8 (line 1663) | int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, cons...
function ImTextStrFromUtf8 (line 1721) | int ImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, c...
function ImTextCountCharsFromUtf8 (line 1740) | int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end)
function ImTextCharToUtf8 (line 1756) | static inline int ImTextCharToUtf8(char* buf, int buf_size, unsigned int c)
function ImTextCountUtf8BytesFromChar (line 1794) | int ImTextCountUtf8BytesFromChar(const char* in_text, const char* in_tex...
function ImTextCountUtf8BytesFromChar (line 1800) | static inline int ImTextCountUtf8BytesFromChar(unsigned int c)
function ImTextStrToUtf8 (line 1809) | int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, con...
function ImTextCountUtf8BytesFromStr (line 1825) | int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* i...
function ImVec4 (line 1844) | ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in)
function ImU32 (line 1854) | ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
function ImU32 (line 1915) | ImU32 ImGui::GetColorU32(ImGuiCol idx, float alpha_mul)
function ImU32 (line 1923) | ImU32 ImGui::GetColorU32(const ImVec4& col)
function ImVec4 (line 1931) | const ImVec4& ImGui::GetStyleColorVec4(ImGuiCol idx)
function ImU32 (line 1937) | ImU32 ImGui::GetColorU32(ImU32 col)
type StaticFunc (line 1978) | struct StaticFunc
method PairCompareByID (line 1980) | PairCompareByID(const void* lhs, const void* rhs)
function SetCursorPosYAndSetupDummyPrevLine (line 2272) | static void SetCursorPosYAndSetupDummyPrevLine(float pos_y, float line_h...
function ImGuiID (line 2661) | ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end)
function ImGuiID (line 2669) | ImGuiID ImGuiWindow::GetID(const void* ptr)
function ImGuiID (line 2677) | ImGuiID ImGuiWindow::GetIDNoKeepAlive(const char* str, const char* str_end)
function ImGuiID (line 2683) | ImGuiID ImGuiWindow::GetIDNoKeepAlive(const void* ptr)
function ImGuiID (line 2690) | ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)
function SetCurrentWindow (line 2699) | static void SetCurrentWindow(ImGuiWindow* window)
function ImGuiID (line 2790) | ImGuiID ImGui::GetHoveredID()
function IsWindowContentHoverable (line 2817) | static inline bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHo...
function ImGuiContext (line 3089) | ImGuiContext* ImGui::GetCurrentContext()
function ImGuiContext (line 3124) | ImGuiContext* ImGui::CreateContext(ImFontAtlas* shared_font_atlas)
function ImGuiIO (line 3143) | ImGuiIO& ImGui::GetIO()
function ImGuiPlatformIO (line 3149) | ImGuiPlatformIO& ImGui::GetPlatformIO()
function ImGuiStyle (line 3155) | ImGuiStyle& ImGui::GetStyle()
function ImDrawData (line 3162) | ImDrawData* ImGui::GetDrawData()
function ImDrawList (line 3178) | static ImDrawList* GetViewportDrawList(ImGuiViewportP* viewport, size_t ...
function ImDrawList (line 3203) | ImDrawList* ImGui::GetBackgroundDrawList(ImGuiViewport* viewport)
function ImDrawList (line 3208) | ImDrawList* ImGui::GetBackgroundDrawList()
function ImDrawList (line 3214) | ImDrawList* ImGui::GetForegroundDrawList(ImGuiViewport* viewport)
function ImDrawList (line 3219) | ImDrawList* ImGui::GetForegroundDrawList()
function ImDrawListSharedData (line 3225) | ImDrawListSharedData* ImGui::GetDrawListSharedData()
function TranslateWindow (line 3357) | static void TranslateWindow(ImGuiWindow* window, const ImVec2& delta)
function ScaleWindow (line 3370) | static void ScaleWindow(ImGuiWindow* window, float scale)
function IsWindowActiveAndVisible (line 3379) | static bool IsWindowActiveAndVisible(ImGuiWindow* window)
function AddWindowToSortBuffer (line 3934) | static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_win...
function AddDrawListToDrawData (line 3951) | static void AddDrawListToDrawData(ImVector<ImDrawList*>* out_list, ImDra...
function AddWindowToDrawData (line 3984) | static void AddWindowToDrawData(ImGuiWindow* window, int layer)
function AddRootWindowToDrawData (line 3998) | static void AddRootWindowToDrawData(ImGuiWindow* window)
function SetupViewportDrawData (line 4022) | static void SetupViewportDrawData(ImGuiViewportP* viewport, ImVector<ImD...
function ImGuiWindow (line 4056) | static ImGuiWindow* FindFrontMostVisibleChildWindow(ImGuiWindow* window)
function ImVec2 (line 4274) | ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool ...
function FindHoveredWindow (line 4341) | static void FindHoveredWindow()
function ImVec2 (line 4538) | ImVec2 ImGui::GetMousePos()
function ImVec2 (line 4544) | ImVec2 ImGui::GetMousePosOnOpeningCurrentPopup()
function ImVec2 (line 4566) | ImVec2 ImGui::GetMouseDragDelta(int button, float lock_threshold)
function ImGuiMouseCursor (line 4587) | ImGuiMouseCursor ImGui::GetMouseCursor()
function ImVec2 (line 4710) | ImVec2 ImGui::GetItemRectMin()
function ImVec2 (line 4716) | ImVec2 ImGui::GetItemRectMax()
function ImVec2 (line 4722) | ImVec2 ImGui::GetItemRectSize()
function CheckStacksSize (line 4851) | static void CheckStacksSize(ImGuiWindow* window, bool write)
function SetWindowConditionAllowFlags (line 4866) | static void SetWindowConditionAllowFlags(ImGuiWindow* window, ImGuiCond ...
function ImGuiWindow (line 4874) | ImGuiWindow* ImGui::FindWindowByID(ImGuiID id)
function ImGuiWindow (line 4880) | ImGuiWindow* ImGui::FindWindowByName(const char* name)
function ImGuiWindow (line 4886) | static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGui...
function ImGuiWindow (line 4947) | static ImGuiWindow* GetWindowForTitleDisplay(ImGuiWindow* window)
function ImGuiWindow (line 4952) | static ImGuiWindow* GetWindowForTitleAndMenuHeight(ImGuiWindow* window)
function ImVec2 (line 4957) | static ImVec2 CalcSizeAfterConstraint(ImGuiWindow* window, ImVec2 new_size)
function ImVec2 (line 4988) | static ImVec2 CalcSizeContents(ImGuiWindow* window)
function ImVec2 (line 5002) | static ImVec2 CalcSizeAutoFit(ImGuiWindow* window, const ImVec2& size_co...
function ImVec2 (line 5039) | ImVec2 ImGui::CalcWindowExpectedSize(ImGuiWindow* window)
function ImVec2 (line 5055) | static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window...
function ImGuiCol (line 5084) | static ImGuiCol GetWindowBgColorIdxFromFlags(ImGuiWindowFlags flags)
function CalcResizePosSizeFromAnyCorner (line 5093) | static void CalcResizePosSizeFromAnyCorner(ImGuiWindow* window, const Im...
type ImGuiResizeGripDef (line 5107) | struct ImGuiResizeGripDef
function ImRect (line 5122) | static ImRect GetResizeBorderRect(ImGuiWindow* window, int border_n, flo...
function ClampWindowRect (line 5253) | static inline void ClampWindowRect(ImGuiWindow* window, const ImRect& re...
type ImGuiResizeBorderDef (line 5271) | struct ImGuiResizeBorderDef
function ImVec2 (line 6407) | ImVec2 ImGui::CalcItemSize(ImVec2 size, float default_w, float default_h)
type ImGuiStyleVarInfo (line 6546) | struct ImGuiStyleVarInfo
function ImGuiStyleVarInfo (line 6581) | static const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx)
function ImGuiID (line 6767) | ImGuiID ImGui::GetWindowDockID()
function ImVec2 (line 6799) | ImVec2 ImGui::GetWindowPos()
function ImVec2 (line 6849) | ImVec2 ImGui::GetWindowSize()
function SetWindowHitTestHole (line 6909) | static void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos,...
function ImVec2 (line 7042) | ImVec2 ImGui::GetContentRegionMax()
function ImVec2 (line 7052) | ImVec2 ImGui::GetContentRegionMaxScreen()
function ImVec2 (line 7061) | ImVec2 ImGui::GetContentRegionAvail()
function ImVec2 (line 7073) | ImVec2 ImGui::GetWindowContentRegionMin()
function ImVec2 (line 7079) | ImVec2 ImGui::GetWindowContentRegionMax()
function ImDrawList (line 7115) | ImDrawList* ImGui::GetWindowDrawList()
function ImGuiViewport (line 7128) | ImGuiViewport* ImGui::GetWindowViewport()
function ImFont (line 7135) | ImFont* ImGui::GetFont()
function ImVec2 (line 7145) | ImVec2 ImGui::GetFontTexUvWhitePixel()
function ImVec2 (line 7160) | ImVec2 ImGui::GetCursorPos()
function ImVec2 (line 7199) | ImVec2 ImGui::GetCursorStartPos()
function ImVec2 (line 7205) | ImVec2 ImGui::GetCursorScreenPos()
function ImGuiStorage (line 7309) | ImGuiStorage* ImGui::GetStateStorage()
function ImGuiID (line 7353) | ImGuiID ImGui::GetID(const char* str_id)
function ImGuiID (line 7359) | ImGuiID ImGui::GetID(const char* str_id_begin, const char* str_id_end)
function ImGuiID (line 7365) | ImGuiID ImGui::GetID(const void* ptr_id)
function ImGuiWindow (line 7579) | ImGuiWindow* ImGui::GetFrontMostPopupModal()
function ImVec2 (line 7862) | ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const I...
function ImRect (line 7915) | ImRect ImGui::GetWindowAllowedExtentRect(ImGuiWindow* window)
function ImVec2 (line 7936) | ImVec2 ImGui::FindBestWindowPosForPopup(ImGuiWindow* window)
function ImGuiDir (line 7984) | ImGuiDir ImGetDirQuadrantFromDelta(float dx, float dy)
function NavScoreItemDistInterval (line 7991) | static float inline NavScoreItemDistInterval(float a0, float a1, float b...
function NavClampRectToVisibleAreaForMoveDir (line 8000) | static void inline NavClampRectToVisibleAreaForMoveDir(ImGuiDir move_dir...
function NavScoreItem (line 8015) | static bool NavScoreItem(ImGuiNavMoveResult* result, ImRect cand)
function ImGuiWindow (line 8290) | static ImGuiWindow* ImGui::NavRestoreLastChildNavWindow(ImGuiWindow* win...
function NavRestoreLayer (line 8300) | static void NavRestoreLayer(ImGuiNavLayer layer)
function ImVec2 (line 8344) | static ImVec2 ImGui::NavCalcPreferredRefPos()
function ImVec2 (line 8386) | ImVec2 ImGui::GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, Im...
function NavScrollToBringItemIntoView (line 8404) | static void NavScrollToBringItemIntoView(ImGuiWindow* window, const ImRe...
function ImGuiWindow (line 8820) | static ImGuiWindow* FindWindowNavFocusable(int i_start, int i_stop, int ...
function NavUpdateWindowingHighlightWindow (line 8829) | static void NavUpdateWindowingHighlightWindow(int focus_change_dir)
function OffsetNormToPixels (line 9099) | static float OffsetNormToPixels(const ImGuiColumns* columns, float offse...
function PixelsToOffsetNorm (line 9104) | static float PixelsToOffsetNorm(const ImGuiColumns* columns, float offset)
function GetDraggedColumnOffset (line 9111) | static float GetDraggedColumnOffset(ImGuiColumns* columns, int column_in...
function GetColumnWidthEx (line 9143) | static float GetColumnWidthEx(ImGuiColumns* columns, int column_index, b...
function ImGuiColumns (line 9211) | ImGuiColumns* ImGui::FindOrCreateColumns(ImGuiWindow* window, ImGuiID id)
function ImGuiID (line 9224) | ImGuiID ImGui::GetColumnsID(const char* str_id, int columns_count)
function ImGuiPayload (line 9626) | const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGui...
function ImGuiPayload (line 9669) | const ImGuiPayload* ImGui::GetDragDropPayload()
function ImGuiWindowSettings (line 9904) | ImGuiWindowSettings* ImGui::CreateNewWindowSettings(const char* name)
function ImGuiWindowSettings (line 9914) | ImGuiWindowSettings* ImGui::FindWindowSettings(ImGuiID id)
function ImGuiWindowSettings (line 9923) | ImGuiWindowSettings* ImGui::FindOrCreateWindowSettings(const char* name)
function ImGuiSettingsHandler (line 9940) | ImGuiSettingsHandler* ImGui::FindSettingsHandler(const char* type_name)
function SettingsHandlerWindow_ReadLine (line 10054) | static void SettingsHandlerWindow_ReadLine(ImGuiContext*, ImGuiSettingsH...
function SettingsHandlerWindow_WriteAll (line 10070) | static void SettingsHandlerWindow_WriteAll(ImGuiContext* imgui_ctx, ImGu...
function ImGuiViewport (line 10137) | ImGuiViewport* ImGui::GetMainViewport()
function ImGuiViewport (line 10143) | ImGuiViewport* ImGui::FindViewportByID(ImGuiID id)
function ImGuiViewport (line 10152) | ImGuiViewport* ImGui::FindViewportByPlatformHandle(void* platform_handle)
function SetWindowViewport (line 10179) | static void SetWindowViewport(ImGuiWindow* window, ImGuiViewportP* viewp...
function ImGuiViewportP (line 10248) | static ImGuiViewportP* FindViewportHoveredFromPlatformWindowStack(const ...
function ImGuiViewportP (line 10450) | ImGuiViewportP* ImGui::AddUpdateViewport(ImGuiWindow* window, ImGuiID id...
type ImGuiDockRequestType (line 10888) | enum ImGuiDockRequestType
type ImGuiDockRequest (line 10896) | struct ImGuiDockRequest
method ImGuiDockRequest (line 10908) | ImGuiDockRequest()
type ImGuiDockPreviewData (line 10919) | struct ImGuiDockPreviewData
method ImGuiDockPreviewData (line 10931) | ImGuiDockPreviewData() : FutureNode(0) { IsDropAllowed = IsCenterAvail...
type ImGuiDockNodeSettings (line 10935) | struct ImGuiDockNodeSettings
method ImGuiDockNodeSettings (line 10948) | ImGuiDockNodeSettings() { ID = ParentID = SelectedTabID = 0; SplitAxis...
type ImGuiDockContext (line 10951) | struct ImGuiDockContext
method ImGuiDockContext (line 10957) | ImGuiDockContext() { WantFullRebuild = false; }
type ImGui (line 10964) | namespace ImGui
function DockNodeGetDepth (line 11002) | static int DockNodeGetDepth(const ImGuiDockNode* node) { ...
function ImGuiDockNode (line 11152) | static ImGuiDockNode* ImGui::DockContextFindNodeByID(ImGuiContext* ctx, ...
function ImGuiID (line 11157) | static ImGuiID ImGui::DockContextGenNodeID(ImGuiContext* ctx)
function ImGuiDockNode (line 11167) | static ImGuiDockNode* ImGui::DockContextAddNode(ImGuiContext* ctx, ImGui...
type ImGuiDockContextPruneNodeData (line 11218) | struct ImGuiDockContextPruneNodeData
method ImGuiDockContextPruneNodeData (line 11222) | ImGuiDockContextPruneNodeData() { CountWindows = CountChildWindows = C...
type ImGuiDockNodeFindInfoResults (line 11797) | struct ImGuiDockNodeFindInfoResults
method ImGuiDockNodeFindInfoResults (line 11804) | ImGuiDockNodeFindInfoResults() { CentralNode = FirstNodeWithWindows = ...
function DockNodeFindInfo (line 11807) | static void DockNodeFindInfo(ImGuiDockNode* node, ImGuiDockNodeFindInfoR...
function ImGuiID (line 12187) | static ImGuiID ImGui::DockNodeUpdateTabListMenu(ImGuiDockNode* node, ImG...
function DockNodeIsDropAllowedOne (line 12451) | static bool DockNodeIsDropAllowedOne(ImGuiWindow* payload, ImGuiWindow* ...
function ImRect (line 12485) | static ImRect ImGui::DockNodeCalcTabBarRect(const ImGuiDockNode* node)
function DockNodeTreeUpdateSplitterFindTouchingNode (line 12918) | static void DockNodeTreeUpdateSplitterFindTouchingNode(ImGuiDockNode* no...
function ImGuiDockNode (line 13044) | ImGuiDockNode* ImGui::DockNodeTreeFindFallbackLeafNode(ImGuiDockNode* node)
function ImGuiDockNode (line 13055) | ImGuiDockNode* ImGui::DockNodeTreeFindNodeByPos(ImGuiDockNode* node, ImV...
function ImGuiID (line 13208) | ImGuiID ImGui::DockSpaceOverViewport(bool has_main_menu_bar, ImGuiViewpo...
function ImGuiDockNode (line 13281) | ImGuiDockNode* ImGui::DockBuilderGetNode(ImGuiID node_id)
function ImGuiID (line 13309) | ImGuiID ImGui::DockBuilderAddNode(ImGuiID id, ImGuiDockNodeFlags flags)
function ImGuiID (line 13446) | ImGuiID ImGui::DockBuilderSplitNode(ImGuiID id, ImGuiDir split_dir, floa...
function ImGuiDockNode (line 13479) | static ImGuiDockNode* DockBuilderCopyNodeRec(ImGuiDockNode* src_node, Im...
function ImGuiDockNodeSettings (line 13891) | static ImGuiDockNodeSettings* ImGui::DockSettingsFindNodeSettings(ImGuiC...
method ImGuiDockNodeSettings (line 10948) | ImGuiDockNodeSettings() { ID = ParentID = SelectedTabID = 0; SplitAxis...
function DockSettingsHandler_DockNodeToSettings (line 13944) | static void DockSettingsHandler_DockNodeToSettings(ImGuiDockContext* dc,...
function SetClipboardTextFn_DefaultImpl (line 14075) | static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
function SetClipboardTextFn_DefaultImpl (line 14105) | static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
function RenderViewportThumbnail (line 14121) | static void RenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewport...
type Funcs (line 14203) | struct Funcs
method NodeDrawList (line 14205) | static void NodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport...
method NodeColumns (line 14276) | static void NodeColumns(const ImGuiColumns* columns)
method NodeWindows (line 14286) | static void NodeWindows(ImVector<ImGuiWindow*>& windows, const char* l...
method NodeWindow (line 14295) | static void NodeWindow(ImGuiWindow* window, const char* label)
method NodeViewport (line 14332) | static void NodeViewport(ImGuiViewportP* viewport)
method NodeDockNode (line 14466) | static void NodeDockNode(ImGuiDockNode* node, const char* label)
method NodeTabBar (line 14502) | static void NodeTabBar(ImGuiTabBar* tab_bar)
type Funcs (line 14464) | struct Funcs
method NodeDrawList (line 14205) | static void NodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport...
method NodeColumns (line 14276) | static void NodeColumns(const ImGuiColumns* columns)
method NodeWindows (line 14286) | static void NodeWindows(ImVector<ImGuiWindow*>& windows, const char* l...
method NodeWindow (line 14295) | static void NodeWindow(ImGuiWindow* window, const char* label)
method NodeViewport (line 14332) | static void NodeViewport(ImGuiViewportP* viewport)
method NodeDockNode (line 14466) | static void NodeDockNode(ImGuiDockNode* node, const char* label)
method NodeTabBar (line 14502) | static void NodeTabBar(ImGuiTabBar* tab_bar)
FILE: src/imgui/imgui.hpp
type ImDrawChannel (line 99) | struct ImDrawChannel
type ImDrawCmd (line 100) | struct ImDrawCmd
method ImDrawCmd (line 1874) | ImDrawCmd() { ElemCount = 0; ClipRect.x = ClipRect.y = ClipRect.z = Cl...
type ImDrawData (line 101) | struct ImDrawData
method ImDrawData (line 2038) | ImDrawData() { Valid = false; Clear(); }
method Clear (line 2040) | void Clear() { Valid = false; CmdLists = NULL; CmdListsCount = Tota...
type ImDrawList (line 102) | struct ImDrawList
method ImDrawList (line 1954) | ImDrawList(const ImDrawListSharedData* shared_data) { _Data = shared_d...
method ImVec2 (line 1961) | inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectS...
method ImVec2 (line 1962) | inline ImVec2 GetClipRectMax() const { const ImVec4& cr = _ClipRectS...
method PathClear (line 1985) | inline void PathClear() ...
method PathLineTo (line 1986) | inline void PathLineTo(const ImVec2& pos) ...
method PathLineToMergeDuplicate (line 1987) | inline void PathLineToMergeDuplicate(const ImVec2& pos) ...
method PathFillConvex (line 1988) | inline void PathFillConvex(ImU32 col) ...
method PathStroke (line 1989) | inline void PathStroke(ImU32 col, bool closed, float thickness = 1...
method PrimWriteVtx (line 2015) | inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU3...
method PrimWriteIdx (line 2016) | inline void PrimWriteIdx(ImDrawIdx idx) ...
method PrimVtx (line 2017) | inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col...
type ImDrawListSharedData (line 103) | struct ImDrawListSharedData
type ImDrawVert (line 104) | struct ImDrawVert
type ImFont (line 105) | struct ImFont
method GetCharAdvance (line 2248) | float GetCharAdvance(ImWchar c) const { retu...
method IsLoaded (line 2249) | bool IsLoaded() const { retu...
type ImFontAtlas (line 106) | struct ImFontAtlas
method IsBuilt (line 2145) | bool IsBuilt() { return Fonts...
method SetTexID (line 2146) | void SetTexID(ImTextureID id) { TexID = id; }
type CustomRect (line 2170) | struct CustomRect
method CustomRect (line 2178) | CustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y...
method IsPacked (line 2179) | bool IsPacked() const { return X != 0xFFFF; }
method CustomRect (line 2184) | const CustomRect* GetCustomRectByIndex(int index) const { if (index ...
method CustomRect (line 2178) | CustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y...
method IsPacked (line 2179) | bool IsPacked() const { return X != 0xFFFF; }
type ImFontConfig (line 107) | struct ImFontConfig
type ImFontGlyph (line 108) | struct ImFontGlyph
type ImFontGlyphRangesBuilder (line 109) | struct ImFontGlyphRangesBuilder
method ImFontGlyphRangesBuilder (line 2089) | ImFontGlyphRangesBuilder() { UsedChars.resize(0x10000 / sizeo...
method GetBit (line 2090) | bool GetBit(int n) const { int off = (n >> 5); int mask = 1...
method SetBit (line 2091) | void SetBit(int n) { int off = (n >> 5); int mask = 1...
method AddChar (line 2092) | void AddChar(ImWchar c) { SetBit(c); }
type ImColor (line 110) | struct ImColor
method ImColor (line 1840) | ImColor() { Valu...
method ImColor (line 1841) | ImColor(int r, int g, int b, int a = 255) { floa...
method ImColor (line 1842) | ImColor(ImU32 rgba) { floa...
method ImColor (line 1843) | ImColor(float r, float g, float b, float a = 1.0f) { Valu...
method ImColor (line 1844) | ImColor(const ImVec4& col) { Valu...
method SetHSV (line 1849) | inline void SetHSV(float h, float s, float v, float a = 1.0f){ ImGu...
method ImColor (line 1850) | static ImColor HSV(float h, float s, float v, float a = 1.0f) { floa...
type ImGuiContext (line 111) | struct ImGuiContext
type ImGuiIO (line 112) | struct ImGuiIO
type ImGuiInputTextCallbackData (line 113) | struct ImGuiInputTextCallbackData
method HasSelection (line 1575) | bool HasSelection() const { return SelectionStart != Se...
type ImGuiListClipper (line 114) | struct ImGuiListClipper
method ImGuiListClipper (line 1805) | ImGuiListClipper(int items_count = -1, float items_height = -1.0f) { ...
type ImGuiOnceUponAFrame (line 115) | struct ImGuiOnceUponAFrame
method ImGuiOnceUponAFrame (line 1675) | ImGuiOnceUponAFrame() { RefFrame = -1; }
type ImGuiPayload (line 116) | struct ImGuiPayload
method ImGuiPayload (line 1603) | ImGuiPayload() { Clear(); }
method Clear (line 1604) | void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize...
method IsDataType (line 1605) | bool IsDataType(const char* type) const { return DataFrameCount != -1 ...
method IsPreview (line 1606) | bool IsPreview() const { return Preview; }
method IsDelivery (line 1607) | bool IsDelivery() const { return Delivery; }
type ImGuiPlatformIO (line 117) | struct ImGuiPlatformIO
method ImGuiPlatformIO (line 2345) | ImGuiPlatformIO() { memset(this, 0, sizeof(*this)); }
type ImGuiPlatformMonitor (line 118) | struct ImGuiPlatformMonitor
method ImGuiPlatformMonitor (line 2287) | ImGuiPlatformMonitor() { MainPos = MainSize = WorkPos = WorkSize = ImV...
type ImGuiSizeCallbackData (line 119) | struct ImGuiSizeCallbackData
type ImGuiStorage (line 120) | struct ImGuiStorage
type Pair (line 1744) | struct Pair
method Pair (line 1748) | Pair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; }
method Pair (line 1749) | Pair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; }
method Pair (line 1750) | Pair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; }
method Clear (line 1757) | void Clear() { Data.clear(); }
type ImGuiStyle (line 121) | struct ImGuiStyle
type ImGuiTextBuffer (line 122) | struct ImGuiTextBuffer
method ImGuiTextBuffer (line 1720) | ImGuiTextBuffer() { }
method size (line 1724) | int size() const { return Buf.Size ? Buf.Si...
method empty (line 1725) | bool empty() { return Buf.Size <= 1; }
method clear (line 1726) | void clear() { Buf.clear(); }
method reserve (line 1727) | void reserve(int capacity) { Buf.reserve(capacity); }
type ImGuiTextFilter (line 123) | struct ImGuiTextFilter
method Clear (line 1692) | void Clear() { InputBuf[0] = 0; Build(); }
method IsActive (line 1693) | bool IsActive() const { return !Filters.empty(); }
type TextRange (line 1696) | struct TextRange
method TextRange (line 1701) | TextRange() { b = e = NULL; }
method TextRange (line 1702) | TextRange(const char* _b, const char* _e) { b = _b; e = _e; }
method empty (line 1705) | bool empty() const { return b == e; }
type ImGuiViewport (line 124) | struct ImGuiViewport
method ImGuiViewport (line 2380) | ImGuiViewport() { ID = 0; Flags = 0; DpiScale = 0.0f; DrawData = N...
type ImGuiWindowClass (line 125) | struct ImGuiWindowClass
method ImGuiWindowClass (line 1620) | ImGuiWindowClass() { ClassId = 0; ParentViewportId = 0; ViewportFlags...
type ImVec2 (line 184) | struct ImVec2
method ImVec2 (line 187) | ImVec2() { x = y = 0.0f; }
method ImVec2 (line 188) | ImVec2(float _x, float _y) { x = _x; y = _y; }
type ImVec4 (line 197) | struct ImVec4
method ImVec4 (line 200) | ImVec4() { x = y = z = w = 0.0f; }
method ImVec4 (line 201) | ImVec4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _...
type ImGui (line 212) | namespace ImGui
function ImDrawList (line 1632) | static inline ImDrawList* GetOverlayDrawList() { return Get...
function SetScrollHere (line 1634) | static inline void SetScrollHere(float center_ratio=0.5f){ SetScrollH...
function IsItemDeactivatedAfterChange (line 1636) | static inline bool IsItemDeactivatedAfterChange() { return IsI...
function IsAnyWindowFocused (line 1643) | static inline bool IsAnyWindowFocused() { return IsW...
function IsAnyWindowHovered (line 1644) | static inline bool IsAnyWindowHovered() { return IsW...
function ImVec2 (line 1645) | static inline ImVec2 CalcItemRectClosestPoint(const ImVec2& pos, bool ...
function ShowTestWindow (line 1647) | static inline void ShowTestWindow() { return Sho...
function IsRootWindowFocused (line 1648) | static inline bool IsRootWindowFocused() { return IsW...
function IsRootWindowOrAnyChildFocused (line 1649) | static inline bool IsRootWindowOrAnyChildFocused() { return IsW...
function SetNextWindowContentWidth (line 1650) | static inline void SetNextWindowContentWidth(float w) { SetNextWin...
function GetItemsLineHeightWithSpacing (line 1651) | static inline float GetItemsLineHeightWithSpacing() { return Get...
function IsRootWindowOrAnyChildHovered (line 1654) | static inline bool IsRootWindowOrAnyChildHovered() { return IsW...
function AlignFirstTextHeightToWidgets (line 1655) | static inline void AlignFirstTextHeightToWidgets() { AlignTextT...
function IsItemHoveredRect (line 1658) | static inline bool IsItemHoveredRect() { return IsI...
function IsPosHoveringAnyWindow (line 1659) | static inline bool IsPosHoveringAnyWindow(const ImVec2&) { IM_ASSERT(...
function IsMouseHoveringAnyWindow (line 1660) | static inline bool IsMouseHoveringAnyWindow() { return IsW...
function IsMouseHoveringWindow (line 1661) | static inline bool IsMouseHoveringWindow() { return IsW...
type ImGuiWindowFlags_ (line 748) | enum ImGuiWindowFlags_
type ImGuiInputTextFlags_ (line 792) | enum ImGuiInputTextFlags_
type ImGuiTreeNodeFlags_ (line 819) | enum ImGuiTreeNodeFlags_
type ImGuiSelectableFlags_ (line 845) | enum ImGuiSelectableFlags_
type ImGuiComboFlags_ (line 855) | enum ImGuiComboFlags_
type ImGuiTabBarFlags_ (line 869) | enum ImGuiTabBarFlags_
type ImGuiTabItemFlags_ (line 885) | enum ImGuiTabItemFlags_
type ImGuiDockNodeFlags_ (line 896) | enum ImGuiDockNodeFlags_
type ImGuiFocusedFlags_ (line 909) | enum ImGuiFocusedFlags_
type ImGuiHoveredFlags_ (line 921) | enum ImGuiHoveredFlags_
type ImGuiDragDropFlags_ (line 937) | enum ImGuiDragDropFlags_
type ImGuiDataType_ (line 959) | enum ImGuiDataType_
type ImGuiDir_ (line 975) | enum ImGuiDir_
type ImGuiKey_ (line 986) | enum ImGuiKey_
type ImGuiNavInput_ (line 1016) | enum ImGuiNavInput_
type ImGuiConfigFlags_ (line 1049) | enum ImGuiConfigFlags_
type ImGuiBackendFlags_ (line 1074) | enum ImGuiBackendFlags_
type ImGuiCol_ (line 1088) | enum ImGuiCol_
type ImGuiStyleVar_ (line 1155) | enum ImGuiStyleVar_
type ImGuiColorEditFlags_ (line 1190) | enum ImGuiColorEditFlags_
type ImGuiMouseCursor_ (line 1236) | enum ImGuiMouseCursor_
type ImGuiCond_ (line 1258) | enum ImGuiCond_
type ImNewDummy (line 1278) | struct ImNewDummy {}
function IM_DELETE (line 1285) | void IM_DELETE(T* p) { if (p) { p->~T(); ImGui::MemFree(p); } }
type ImVector (line 1297) | struct ImVector
method ImVector (line 1309) | inline ImVector() { Size = Capac...
method ImVector (line 1310) | inline ImVector(const ImVector<T>& src) { Size = Capac...
method empty (line 1314) | inline bool empty() const { return Size ...
method size (line 1315) | inline int size() const { return Size; }
method size_in_bytes (line 1316) | inline int size_in_bytes() const { return Size ...
method capacity (line 1317) | inline int capacity() const { return Capac...
method T (line 1318) | inline T& operator[](int i) { IM_ASSERT(i ...
method T (line 1319) | inline const T& operator[](int i) const { IM_ASSERT(i ...
method clear (line 1321) | inline void clear() { if (Data) { ...
method T (line 1322) | inline T* begin() { return Data; }
method T (line 1323) | inline const T* begin() const { return Data; }
method T (line 1324) | inline T* end() { return Data ...
method T (line 1325) | inline const T* end() const { return Data ...
method T (line 1326) | inline T& front() { IM_ASSERT(Si...
method T (line 1327) | inline const T& front() const { IM_ASSERT(Si...
method T (line 1328) | inline T& back() { IM_ASSERT(Si...
method T (line 1329) | inline const T& back() const { IM_ASSERT(Si...
method swap (line 1330) | inline void swap(ImVector<T>& rhs) { int rhs_size...
method _grow_capacity (line 1332) | inline int _grow_capacity(int sz) const { int new_capa...
method resize (line 1333) | inline void resize(int new_size) { if (new_size...
method resize (line 1334) | inline void resize(int new_size, const T& v) { if (new_size...
method reserve (line 1335) | inline void reserve(int new_capacity) { if (new_capa...
method push_back (line 1338) | inline void push_back(const T& v) { if (Size == ...
method pop_back (line 1339) | inline void pop_back() { IM_ASSERT(Si...
method push_front (line 1340) | inline void push_front(const T& v) { if (Size == ...
method T (line 1341) | inline T* erase(const T* it) { IM_ASSERT(it...
method T (line 1342) | inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it...
method T (line 1343) | inline T* erase_unsorted(const T* it) { IM_ASSERT(it...
method T (line 1344) | inline T* insert(const T* it, const T& v) { IM_ASSERT(it...
method contains (line 1345) | inline bool contains(const T& v) const { const T* dat...
method index_from_ptr (line 1346) | inline int index_from_ptr(const T* it) const { IM_ASSERT(it...
type ImGuiStyle (line 1356) | struct ImGuiStyle
type ImGuiIO (line 1402) | struct ImGuiIO
type ImGuiInputTextCallbackData (line 1551) | struct ImGuiInputTextCallbackData
method HasSelection (line 1575) | bool HasSelection() const { return SelectionStart != Se...
type ImGuiSizeCallbackData (line 1580) | struct ImGuiSizeCallbackData
type ImGuiPayload (line 1589) | struct ImGuiPayload
method ImGuiPayload (line 1603) | ImGuiPayload() { Clear(); }
method Clear (line 1604) | void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize...
method IsDataType (line 1605) | bool IsDataType(const char* type) const { return DataFrameCount != -1 ...
method IsPreview (line 1606) | bool IsPreview() const { return Preview; }
method IsDelivery (line 1607) | bool IsDelivery() const { return Delivery; }
type ImGuiWindowClass (line 1612) | struct ImGuiWindowClass
method ImGuiWindowClass (line 1620) | ImGuiWindowClass() { ClassId = 0; ParentViewportId = 0; ViewportFlags...
type ImGui (line 1629) | namespace ImGui
function ImDrawList (line 1632) | static inline ImDrawList* GetOverlayDrawList() { return Get...
function SetScrollHere (line 1634) | static inline void SetScrollHere(float center_ratio=0.5f){ SetScrollH...
function IsItemDeactivatedAfterChange (line 1636) | static inline bool IsItemDeactivatedAfterChange() { return IsI...
function IsAnyWindowFocused (line 1643) | static inline bool IsAnyWindowFocused() { return IsW...
function IsAnyWindowHovered (line 1644) | static inline bool IsAnyWindowHovered() { return IsW...
function ImVec2 (line 1645) | static inline ImVec2 CalcItemRectClosestPoint(const ImVec2& pos, bool ...
function ShowTestWindow (line 1647) | static inline void ShowTestWindow() { return Sho...
function IsRootWindowFocused (line 1648) | static inline bool IsRootWindowFocused() { return IsW...
function IsRootWindowOrAnyChildFocused (line 1649) | static inline bool IsRootWindowOrAnyChildFocused() { return IsW...
function SetNextWindowContentWidth (line 1650) | static inline void SetNextWindowContentWidth(float w) { SetNextWin...
function GetItemsLineHeightWithSpacing (line 1651) | static inline float GetItemsLineHeightWithSpacing() { return Get...
function IsRootWindowOrAnyChildHovered (line 1654) | static inline bool IsRootWindowOrAnyChildHovered() { return IsW...
function AlignFirstTextHeightToWidgets (line 1655) | static inline void AlignFirstTextHeightToWidgets() { AlignTextT...
function IsItemHoveredRect (line 1658) | static inline bool IsItemHoveredRect() { return IsI...
function IsPosHoveringAnyWindow (line 1659) | static inline bool IsPosHoveringAnyWindow(const ImVec2&) { IM_ASSERT(...
function IsMouseHoveringAnyWindow (line 1660) | static inline bool IsMouseHoveringAnyWindow() { return IsW...
function IsMouseHoveringWindow (line 1661) | static inline bool IsMouseHoveringWindow() { return IsW...
type ImGuiOnceUponAFrame (line 1673) | struct ImGuiOnceUponAFrame
method ImGuiOnceUponAFrame (line 1675) | ImGuiOnceUponAFrame() { RefFrame = -1; }
type ImGuiTextFilter (line 1686) | struct ImGuiTextFilter
method Clear (line 1692) | void Clear() { InputBuf[0] = 0; Build(); }
method IsActive (line 1693) | bool IsActive() const { return !Filters.empty(); }
type TextRange (line 1696) | struct TextRange
method TextRange (line 1701) | TextRange() { b = e = NULL; }
method TextRange (line 1702) | TextRange(const char* _b, const char* _e) { b = _b; e = _e; }
method empty (line 1705) | bool empty() const { return b == e; }
type ImGuiTextBuffer (line 1715) | struct ImGuiTextBuffer
method ImGuiTextBuffer (line 1720) | ImGuiTextBuffer() { }
method size (line 1724) | int size() const { return Buf.Size ? Buf.Si...
method empty (line 1725) | bool empty() { return Buf.Size <= 1; }
method clear (line 1726) | void clear() { Buf.clear(); }
method reserve (line 1727) | void reserve(int capacity) { Buf.reserve(capacity); }
type ImGuiStorage (line 1742) | struct ImGuiStorage
type Pair (line 1744) | struct Pair
method Pair (line 1748) | Pair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; }
method Pair (line 1749) | Pair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; }
method Pair (line 1750) | Pair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; }
method Clear (line 1757) | void Clear() { Data.clear(); }
type ImGuiListClipper (line 1796) | struct ImGuiListClipper
method ImGuiListClipper (line 1805) | ImGuiListClipper(int items_count = -1, float items_height = -1.0f) { ...
type ImColor (line 1836) | struct ImColor
method ImColor (line 1840) | ImColor() { Valu...
method ImColor (line 1841) | ImColor(int r, int g, int b, int a = 255) { floa...
method ImColor (line 1842) | ImColor(ImU32 rgba) { floa...
method ImColor (line 1843) | ImColor(float r, float g, float b, float a = 1.0f) { Valu...
method ImColor (line 1844) | ImColor(const ImVec4& col) { Valu...
method SetHSV (line 1849) | inline void SetHSV(float h, float s, float v, float a = 1.0f){ ImGu...
method ImColor (line 1850) | static ImColor HSV(float h, float s, float v, float a = 1.0f) { floa...
type ImDrawCmd (line 1866) | struct ImDrawCmd
method ImDrawCmd (line 1874) | ImDrawCmd() { ElemCount = 0; ClipRect.x = ClipRect.y = ClipRect.z = Cl...
type ImDrawVert (line 1884) | struct ImDrawVert
type ImDrawChannel (line 1900) | struct ImDrawChannel
type ImDrawCornerFlags_ (line 1906) | enum ImDrawCornerFlags_
type ImDrawListFlags_ (line 1919) | enum ImDrawListFlags_
type ImDrawList (line 1932) | struct ImDrawList
method ImDrawList (line 1954) | ImDrawList(const ImDrawListSharedData* shared_data) { _Data = shared_d...
method ImVec2 (line 1961) | inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectS...
method ImVec2 (line 1962) | inline ImVec2 GetClipRectMax() const { const ImVec4& cr = _ClipRectS...
method PathClear (line 1985) | inline void PathClear() ...
method PathLineTo (line 1986) | inline void PathLineTo(const ImVec2& pos) ...
method PathLineToMergeDuplicate (line 1987) | inline void PathLineToMergeDuplicate(const ImVec2& pos) ...
method PathFillConvex (line 1988) | inline void PathFillConvex(ImU32 col) ...
method PathStroke (line 1989) | inline void PathStroke(ImU32 col, bool closed, float thickness = 1...
method PrimWriteVtx (line 2015) | inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU3...
method PrimWriteIdx (line 2016) | inline void PrimWriteIdx(ImDrawIdx idx) ...
method PrimVtx (line 2017) | inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col...
type ImDrawData (line 2025) | struct ImDrawData
method ImDrawData (line 2038) | ImDrawData() { Valid = false; Clear(); }
method Clear (line 2040) | void Clear() { Valid = false; CmdLists = NULL; CmdListsCount = Tota...
type ImFontConfig (line 2049) | struct ImFontConfig
type ImFontGlyph (line 2075) | struct ImFontGlyph
type ImFontGlyphRangesBuilder (line 2085) | struct ImFontGlyphRangesBuilder
method ImFontGlyphRangesBuilder (line 2089) | ImFontGlyphRangesBuilder() { UsedChars.resize(0x10000 / sizeo...
method GetBit (line 2090) | bool GetBit(int n) const { int off = (n >> 5); int mask = 1...
method SetBit (line 2091) | void SetBit(int n) { int off = (n >> 5); int mask = 1...
method AddChar (line 2092) | void AddChar(ImWchar c) { SetBit(c); }
type ImFontAtlasFlags_ (line 2098) | enum ImFontAtlasFlags_
type ImFontAtlas (line 2122) | struct ImFontAtlas
method IsBuilt (line 2145) | bool IsBuilt() { return Fonts...
method SetTexID (line 2146) | void SetTexID(ImTextureID id) { TexID = id; }
type CustomRect (line 2170) | struct CustomRect
method CustomRect (line 2178) | CustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y...
method IsPacked (line 2179) | bool IsPacked() const { return X != 0xFFFF; }
method CustomRect (line 2184) | const CustomRect* GetCustomRectByIndex(int index) const { if (index ...
method CustomRect (line 2178) | CustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y...
method IsPacked (line 2179) | bool IsPacked() const { return X != 0xFFFF; }
type ImFont (line 2220) | struct ImFont
method GetCharAdvance (line 2248) | float GetCharAdvance(ImWchar c) const { retu...
method IsLoaded (line 2249) | bool IsLoaded() const { retu...
type ImGuiPlatformMonitor (line 2282) | struct ImGuiPlatformMonitor
method ImGuiPlatformMonitor (line 2287) | ImGuiPlatformMonitor() { MainPos = MainSize = WorkPos = WorkSize = ImV...
type ImGuiPlatformIO (line 2300) | struct ImGuiPlatformIO
method ImGuiPlatformIO (line 2345) | ImGuiPlatformIO() { memset(this, 0, sizeof(*this)); }
type ImGuiViewportFlags_ (line 2349) | enum ImGuiViewportFlags_
type ImGuiViewport (line 2363) | struct ImGuiViewport
method ImGuiViewport (line 2380) | ImGuiViewport() { ID = 0; Flags = 0; DpiScale = 0.0f; DrawData = N...
FILE: src/imgui/imgui_draw.cpp
function IMGUI_API (line 376) | IMGUI_API void ImGui::StyleCorporateGrey(ImGuiStyle* dst)
function ImDrawList (line 782) | ImDrawList* ImDrawList::CloneOutput() const
function PathBezierToCasteljau (line 1355) | static void PathBezierToCasteljau(ImVector<ImVec2>* path, float x1, floa...
function ImFont (line 1928) | ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
function Decode85Byte (line 1960) | static unsigned int Decode85Byte(char c) ...
function Decode85 (line 1961) | static void Decode85(const unsigned char* src, unsigned char* dst)
function ImFont (line 1973) | ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
function ImFont (line 1993) | ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size...
function ImFont (line 2015) | ImFont* ImFontAtlas::AddFontFromMemoryTTF(void* ttf_data, int ttf_size, ...
function ImFont (line 2028) | ImFont* ImFontAtlas::AddFontFromMemoryCompressedTTF(const void* compress...
function ImFont (line 2040) | ImFont* ImFontAtlas::AddFontFromMemoryCompressedBase85TTF(const char* co...
function ImFontAtlasBuildMultiplyCalcLookupTable (line 2115) | void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[...
function ImFontAtlasBuildMultiplyRectAlpha8 (line 2124) | void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256...
type ImFontBuildSrcData (line 2134) | struct ImFontBuildSrcData
type ImFontBuildDstData (line 2149) | struct ImFontBuildDstData
function UnpackBoolVectorToFlatIndexList (line 2157) | static void UnpackBoolVectorToFlatIndexList(const ImBoolVector* in, ImVe...
function ImFontAtlasBuildWithStbTruetype (line 2169) | bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
function ImFontAtlasBuildRegisterDefaultCustomRects (line 2425) | void ImFontAtlasBuildRegisterDefaultCustomRects(ImFontAtlas* atlas)
function ImFontAtlasBuildSetupFont (line 2435) | void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontC...
function ImFontAtlasBuildPackCustomRects (line 2449) | void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* stbrp_con...
function ImFontAtlasBuildRenderDefaultTexData (line 2476) | static void ImFontAtlasBuildRenderDefaultTexData(ImFontAtlas* atlas)
function ImFontAtlasBuildFinish (line 2507) | void ImFontAtlasBuildFinish(ImFontAtlas* atlas)
function ImWchar (line 2532) | const ImWchar* ImFontAtlas::GetGlyphRangesDefault()
function ImWchar (line 2542) | const ImWchar* ImFontAtlas::GetGlyphRangesKorean()
function ImWchar (line 2554) | const ImWchar* ImFontAtlas::GetGlyphRangesChineseFull()
function UnpackAccumulativeOffsetsIntoRanges (line 2569) | static void UnpackAccumulativeOffsetsIntoRanges(int base_codepoint, cons...
function ImWchar (line 2583) | const ImWchar* ImFontAtlas::GetGlyphRangesChineseSimplifiedCommon()
function ImWchar (line 2650) | const ImWchar* ImFontAtlas::GetGlyphRangesJapanese()
function ImWchar (line 2708) | const ImWchar* ImFontAtlas::GetGlyphRangesCyrillic()
function ImWchar (line 2721) | const ImWchar* ImFontAtlas::GetGlyphRangesThai()
function ImWchar (line 2733) | const ImWchar* ImFontAtlas::GetGlyphRangesVietnamese()
function ImFontGlyph (line 2921) | const ImFontGlyph* ImFont::FindGlyph(ImWchar c) const
function ImFontGlyph (line 2931) | const ImFontGlyph* ImFont::FindGlyphNoFallback(ImWchar c) const
function ImVec2 (line 3040) | ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_wid...
function ImAcos01 (line 3406) | static inline float ImAcos01(float x)
function stb_decompress_length (line 3514) | static unsigned int stb_decompress_length(const unsigned char *input)
function stb__match (line 3522) | static void stb__match(const unsigned char *data, unsigned int length)
function stb__lit (line 3531) | static void stb__lit(const unsigned char *data, unsigned int length)
function stb_adler32 (line 3561) | static unsigned int stb_adler32(unsigned int adler32, unsigned char *buf...
function stb_decompress (line 3592) | static unsigned int stb_decompress(unsigned char *output, const unsigned...
FILE: src/imgui/imgui_impl_dx12.cpp
type FrameResources (line 45) | struct FrameResources
type VERTEX_CONSTANT_BUFFER (line 57) | struct VERTEX_CONSTANT_BUFFER
function ImGui_ImplDX12_RenderDrawData (line 68) | void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12Graphics...
function ImGui_ImplDX12_CreateFontsTexture (line 229) | static void ImGui_ImplDX12_CreateFontsTexture()
function ImGui_ImplDX12_CreateDeviceObjects (line 379) | bool ImGui_ImplDX12_CreateDeviceObjects()
function IMGUI_IMPL_API (line 577) | IMGUI_IMPL_API bool ImGui_ImplDX12_IsInitialized()
function ImGui_ImplDX12_InvalidateDeviceObjects (line 582) | void ImGui_ImplDX12_InvalidateDeviceObjects()
function ImGui_ImplDX12_Init (line 601) | bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight,...
function ImGui_ImplDX12_Shutdown (line 635) | void ImGui_ImplDX12_Shutdown()
function ImGui_ImplDX12_NewFrame (line 650) | void ImGui_ImplDX12_NewFrame()
type ImGuiViewportDataDx12 (line 662) | struct ImGuiViewportDataDx12
method ImGuiViewportDataDx12 (line 666) | ImGuiViewportDataDx12() { SwapChain = NULL; }
function ImGui_ImplDX12_CreateWindow (line 670) | static void ImGui_ImplDX12_CreateWindow(ImGuiViewport* viewport)
function ImGui_ImplDX12_DestroyWindow (line 710) | static void ImGui_ImplDX12_DestroyWindow(ImGuiViewport* viewport)
function ImGui_ImplDX12_SetWindowSize (line 729) | static void ImGui_ImplDX12_SetWindowSize(ImGuiViewport* viewport, ImVec2...
function ImGui_ImplDX12_RenderWindow (line 752) | static void ImGui_ImplDX12_RenderWindow(ImGuiViewport* viewport, void* r...
function ImGui_ImplDX12_SwapBuffers (line 769) | static void ImGui_ImplDX12_SwapBuffers(ImGuiViewport* viewport, void*)
function ImGui_ImplDX12_InitPlatformInterface (line 779) | void ImGui_ImplDX12_InitPlatformInterface()
function ImGui_ImplDX12_ShutdownPlatformInterface (line 789) | void ImGui_ImplDX12_ShutdownPlatformInterface()
FILE: src/imgui/imgui_impl_dx12.hpp
type DXGI_FORMAT (line 17) | enum DXGI_FORMAT : std::int32_t
type ID3D12Device (line 18) | struct ID3D12Device
type ID3D12GraphicsCommandList (line 19) | struct ID3D12GraphicsCommandList
type D3D12_CPU_DESCRIPTOR_HANDLE (line 20) | struct D3D12_CPU_DESCRIPTOR_HANDLE
type D3D12_GPU_DESCRIPTOR_HANDLE (line 21) | struct D3D12_GPU_DESCRIPTOR_HANDLE
FILE: src/imgui/imgui_impl_win32.cpp
function ImGui_ImplWin32_Init (line 57) | bool ImGui_ImplWin32_Init(void* hwnd)
function ImGui_ImplWin32_Shutdown (line 105) | void ImGui_ImplWin32_Shutdown()
function ImGui_ImplWin32_UpdateMouseCursor (line 111) | static bool ImGui_ImplWin32_UpdateMouseCursor()
function ImGui_ImplWin32_UpdateMousePos (line 145) | static void ImGui_ImplWin32_UpdateMousePos()
function ImGui_ImplWin32_UpdateGamepads (line 207) | static void ImGui_ImplWin32_UpdateGamepads()
function ImGui_ImplWin32_NewFrame (line 253) | void ImGui_ImplWin32_NewFrame()
function IMGUI_IMPL_API (line 308) | IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT ms...
function BOOL (line 392) | static BOOL IsWindowsVersionOrGreater(WORD major, WORD minor, WORD sp)
function ImGui_ImplWin32_EnableDpiAwareness (line 419) | void ImGui_ImplWin32_EnableDpiAwareness()
function ImGui_ImplWin32_GetDpiScaleForMonitor (line 446) | float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor)
function ImGui_ImplWin32_GetDpiScaleForHwnd (line 466) | float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd)
function ImGui_ImplWin32_SetImeInputPos (line 482) | static void ImGui_ImplWin32_SetImeInputPos(ImGuiViewport* viewport, ImVe...
type ImGuiViewportDataWin32 (line 502) | struct ImGuiViewportDataWin32
method ImGuiViewportDataWin32 (line 509) | ImGuiViewportDataWin32() { Hwnd = NULL; HwndOwned = false; DwStyle = ...
function ImGui_ImplWin32_GetWin32StyleFromViewportFlags (line 513) | static void ImGui_ImplWin32_GetWin32StyleFromViewportFlags(ImGuiViewport...
function ImGui_ImplWin32_CreateWindow (line 529) | static void ImGui_ImplWin32_CreateWindow(ImGuiViewport* viewport)
function ImGui_ImplWin32_DestroyWindow (line 553) | static void ImGui_ImplWin32_DestroyWindow(ImGuiViewport* viewport)
function ImGui_ImplWin32_ShowWindow (line 571) | static void ImGui_ImplWin32_ShowWindow(ImGuiViewport* viewport)
function ImGui_ImplWin32_UpdateWindow (line 581) | static void ImGui_ImplWin32_UpdateWindow(ImGuiViewport* viewport)
function ImVec2 (line 606) | static ImVec2 ImGui_ImplWin32_GetWindowPos(ImGuiViewport* viewport)
function ImGui_ImplWin32_SetWindowPos (line 615) | static void ImGui_ImplWin32_SetWindowPos(ImGuiViewport* viewport, ImVec2...
function ImVec2 (line 624) | static ImVec2 ImGui_ImplWin32_GetWindowSize(ImGuiViewport* viewport)
function ImGui_ImplWin32_SetWindowSize (line 633) | static void ImGui_ImplWin32_SetWindowSize(ImGuiViewport* viewport, ImVec...
function ImGui_ImplWin32_SetWindowFocus (line 642) | static void ImGui_ImplWin32_SetWindowFocus(ImGuiViewport* viewport)
function ImGui_ImplWin32_GetWindowFocus (line 651) | static bool ImGui_ImplWin32_GetWindowFocus(ImGuiViewport* viewport)
function ImGui_ImplWin32_GetWindowMinimized (line 658) | static bool ImGui_ImplWin32_GetWindowMinimized(ImGuiViewport* viewport)
function ImGui_ImplWin32_SetWindowTitle (line 665) | static void ImGui_ImplWin32_SetWindowTitle(ImGuiViewport* viewport, cons...
function ImGui_ImplWin32_SetWindowAlpha (line 677) | static void ImGui_ImplWin32_SetWindowAlpha(ImGuiViewport* viewport, floa...
function ImGui_ImplWin32_GetWindowDpiScale (line 695) | static float ImGui_ImplWin32_GetWindowDpiScale(ImGuiViewport* viewport)
function ImGui_ImplWin32_OnChangedViewport (line 703) | static void ImGui_ImplWin32_OnChangedViewport(ImGuiViewport* viewport)
function LRESULT (line 718) | static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HW...
function BOOL (line 754) | static BOOL CALLBACK ImGui_ImplWin32_UpdateMonitors_EnumFunc(HMONITOR mo...
function ImGui_ImplWin32_UpdateMonitors (line 774) | static void ImGui_ImplWin32_UpdateMonitors()
function ImGui_ImplWin32_InitPlatformInterface (line 781) | static void ImGui_ImplWin32_InitPlatformInterface()
function ImGui_ImplWin32_ShutdownPlatformInterface (line 830) | static void ImGui_ImplWin32_ShutdownPlatformInterface()
FILE: src/imgui/imgui_internal.hpp
type ImRect (line 61) | struct ImRect
type ImDrawDataBuilder (line 62) | struct ImDrawDataBuilder
method Clear (line 746) | void Clear() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n+...
method ClearFreeMemory (line 747) | void ClearFreeMemory() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n+...
type ImDrawListSharedData (line 63) | struct ImDrawListSharedData
type ImGuiColorMod (line 64) | struct ImGuiColorMod
type ImGuiColumnData (line 65) | struct ImGuiColumnData
method ImGuiColumnData (line 692) | ImGuiColumnData() { OffsetNorm = OffsetNormBeforeResize = 0.0f; Flag...
type ImGuiColumns (line 66) | struct ImGuiColumns
method ImGuiColumns (line 709) | ImGuiColumns() { Clear(); }
method Clear (line 710) | void Clear()
type ImGuiContext (line 67) | struct ImGuiContext
method ImGuiContext (line 1145) | ImGuiContext(ImFontAtlas* shared_font_atlas)
type ImGuiDataTypeInfo (line 68) | struct ImGuiDataTypeInfo
type ImGuiDockContext (line 69) | struct ImGuiDockContext
type ImGuiDockNode (line 70) | struct ImGuiDockNode
method IsRootNode (line 927) | bool IsRootNode() const { return ParentNode ==...
method IsDockSpace (line 928) | bool IsDockSpace() const { return (LocalFlags &...
method IsCentralNode (line 929) | bool IsCentralNode() const { return (LocalFlags &...
method IsHiddenTabBar (line 930) | bool IsHiddenTabBar() const { return (LocalFlags &...
method IsNoTabBar (line 931) | bool IsNoTabBar() const { return (LocalFlags &...
method IsSplitNode (line 932) | bool IsSplitNode() const { return ChildNodes[0]...
method IsLeafNode (line 933) | bool IsLeafNode() const { return ChildNodes[0]...
method IsEmpty (line 934) | bool IsEmpty() const { return ChildNodes[0]...
method ImGuiDockNodeFlags (line 935) | ImGuiDockNodeFlags GetMergedFlags() const { return SharedFlags |...
method ImRect (line 936) | ImRect Rect() const { return ImRect(Pos.x,...
type ImGuiDockNodeSettings (line 71) | struct ImGuiDockNodeSettings
type ImGuiGroupData (line 72) | struct ImGuiGroupData
type ImGuiInputTextState (line 73) | struct ImGuiInputTextState
type ImGuiItemHoveredDataBackup (line 74) | struct ImGuiItemHoveredDataBackup
method ImGuiItemHoveredDataBackup (line 1484) | ImGuiItemHoveredDataBackup() { Backup(); }
method Backup (line 1485) | void Backup() { ImGuiWindow* window = GImGui->CurrentWindow;...
method Restore (line 1486) | void Restore() const { ImGuiWindow* window = GImGui->CurrentWindow;...
type ImGuiMenuColumns (line 75) | struct ImGuiMenuColumns
type ImGuiNavMoveResult (line 76) | struct ImGuiNavMoveResult
method ImGuiNavMoveResult (line 795) | ImGuiNavMoveResult() { Clear(); }
method Clear (line 796) | void Clear() { ID = SelectScopeId = 0; Window = NULL; DistBox ...
type ImGuiNextWindowData (line 77) | struct ImGuiNextWindowData
method ImGuiNextWindowData (line 826) | ImGuiNextWindowData()
method Clear (line 840) | void Clear()
type ImGuiPopupData (line 78) | struct ImGuiPopupData
method ImGuiPopupData (line 682) | ImGuiPopupData() { PopupId = 0; Window = SourceWindow = NULL; OpenFram...
type ImGuiSettingsHandler (line 79) | struct ImGuiSettingsHandler
method ImGuiSettingsHandler (line 668) | ImGuiSettingsHandler() { memset(this, 0, sizeof(*this)); }
type ImGuiStyleMod (line 80) | struct ImGuiStyleMod
method ImGuiStyleMod (line 577) | ImGuiStyleMod(ImGuiStyleVar idx, int v) { VarIdx = idx; BackupInt[...
method ImGuiStyleMod (line 578) | ImGuiStyleMod(ImGuiStyleVar idx, float v) { VarIdx = idx; BackupFloa...
method ImGuiStyleMod (line 579) | ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v) { VarIdx = idx; BackupFloa...
type ImGuiTabBar (line 81) | struct ImGuiTabBar
method GetTabOrder (line 1551) | int GetTabOrder(const ImGuiTabItem* tab) const { retu...
type ImGuiTabItem (line 82) | struct ImGuiTabItem
method ImGuiTabItem (line 1520) | ImGuiTabItem() { ID = Flags = 0; Window = NULL; LastFrameVisible ...
type ImGuiWindow (line 83) | struct ImGuiWindow
type ImGuiWindowTempData (line 84) | struct ImGuiWindowTempData
type ImGuiWindowSettings (line 85) | struct ImGuiWindowSettings
method ImGuiWindowSettings (line 656) | ImGuiWindowSettings() { Name = NULL; ID = 0; Pos = Size = ViewportPos ...
type ImStb (line 105) | namespace ImStb
function ImCharIsBlankA (line 167) | static inline bool ImCharIsBlankA(char c) { return c == ' ...
function ImCharIsBlankW (line 168) | static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ...
function ImIsPowerOfTwo (line 169) | static inline bool ImIsPowerOfTwo(int v) { return v != 0 ...
function ImUpperPowerOfTwo (line 170) | static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >>...
function ImU32 (line 173) | static inline ImU32 ImHash(const void* data, int size, ImU32 seed = ...
function ImVec2 (line 207) | static inline ImVec2 operator*(const ImVec2& lhs, const float rhs) ...
function ImVec2 (line 208) | static inline ImVec2 operator/(const ImVec2& lhs, const float rhs) ...
function ImVec2 (line 209) | static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 210) | static inline ImVec2 operator-(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 211) | static inline ImVec2 operator*(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 212) | static inline ImVec2 operator/(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 213) | static inline ImVec2& operator+=(ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 214) | static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 215) | static inline ImVec2& operator*=(ImVec2& lhs, const float rhs) ...
function ImVec2 (line 216) | static inline ImVec2& operator/=(ImVec2& lhs, const float rhs) ...
function ImVec4 (line 217) | static inline ImVec4 operator+(const ImVec4& lhs, const ImVec4& rhs) ...
function ImVec4 (line 218) | static inline ImVec4 operator-(const ImVec4& lhs, const ImVec4& rhs) ...
function ImVec4 (line 219) | static inline ImVec4 operator*(const ImVec4& lhs, const ImVec4& rhs) ...
function ImFabs (line 225) | static inline float ImFabs(float x) ...
function ImSqrt (line 226) | static inline float ImSqrt(float x) ...
function ImPow (line 227) | static inline float ImPow(float x, float y) ...
function ImPow (line 228) | static inline double ImPow(double x, double y) ...
function ImFmod (line 229) | static inline float ImFmod(float x, float y) ...
function ImFmod (line 230) | static inline double ImFmod(double x, double y) ...
function ImCos (line 231) | static inline float ImCos(float x) ...
function ImSin (line 232) | static inline float ImSin(float x) ...
function ImAcos (line 233) | static inline float ImAcos(float x) ...
function ImAtan2 (line 234) | static inline float ImAtan2(float y, float x) ...
function ImAtof (line 235) | static inline double ImAtof(const char* s) ...
function ImFloorStd (line 236) | static inline float ImFloorStd(float x) ...
function ImCeil (line 237) | static inline float ImCeil(float x) ...
function T (line 241) | static inline T ImMin(T lhs, T rhs) { return lhs ...
function T (line 242) | static inline T ImMax(T lhs, T rhs) { return lhs ...
function T (line 243) | static inline T ImClamp(T v, T mn, T mx) { return (v <...
function T (line 244) | static inline T ImLerp(T a, T b, float t) { return (T)(...
function ImSwap (line 245) | static inline void ImSwap(T& a, T& b) { T tmp = a; ...
function T (line 246) | static inline T ImAddClampOverflow(T a, T b, T mn, T mx) { if (b < 0 &...
function T (line 247) | static inline T ImSubClampOverflow(T a, T b, T mn, T mx) { if (b > 0 &...
function ImVec2 (line 249) | static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 250) | static inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) ...
function ImVec2 (line 251) | static inline ImVec2 ImClamp(const ImVec2& v, const ImVec2& mn, ImVec2 m...
function ImVec2 (line 252) | static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t) ...
function ImVec2 (line 253) | static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVe...
function ImVec4 (line 254) | static inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) ...
function ImSaturate (line 255) | static inline float ImSaturate(float f) ...
function ImLengthSqr (line 256) | static inline float ImLengthSqr(const ImVec2& lhs) ...
function ImLengthSqr (line 257) | static inline float ImLengthSqr(const ImVec4& lhs) ...
function ImInvLength (line 258) | static inline float ImInvLength(const ImVec2& lhs, float fail_value) ...
function ImFloor (line 259) | static inline float ImFloor(float f) ...
function ImVec2 (line 260) | static inline ImVec2 ImFloor(const ImVec2& v) ...
function ImModPositive (line 261) | static inline int ImModPositive(int a, int b) ...
function ImDot (line 262) | static inline float ImDot(const ImVec2& a, const ImVec2& b) ...
function ImVec2 (line 263) | static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a)...
function ImLinearSweep (line 264) | static inline float ImLinearSweep(float current, float target, float sp...
function ImVec2 (line 265) | static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) ...
type ImBoolVector (line 269) | struct ImBoolVector
method ImBoolVector (line 272) | ImBoolVector() { }
method Resize (line 273) | void Resize(int sz) { Storage.resize((sz + 31) >> ...
method Clear (line 274) | void Clear() { Storage.clear(); }
method GetBit (line 275) | bool GetBit(int n) const { int off = (n >> 5); int mask...
method SetBit (line 276) | void SetBit(int n, bool v) { int off = (n >> 5); int mask...
function ImPool (line 283) | struct IMGUI_API ImPool
type ImGuiButtonFlags_ (line 308) | enum ImGuiButtonFlags_
type ImGuiSliderFlags_ (line 328) | enum ImGuiSliderFlags_
type ImGuiDragFlags_ (line 334) | enum ImGuiDragFlags_
type ImGuiColumnsFlags_ (line 340) | enum ImGuiColumnsFlags_
type ImGuiSelectableFlagsPrivate_ (line 351) | enum ImGuiSelectableFlagsPrivate_
type ImGuiSeparatorFlags_ (line 361) | enum ImGuiSeparatorFlags_
type ImGuiItemFlags_ (line 370) | enum ImGuiItemFlags_
type ImGuiItemStatusFlags_ (line 382) | enum ImGuiItemStatusFlags_
type ImGuiTextFlags_ (line 399) | enum ImGuiTextFlags_
type ImGuiLayoutType_ (line 407) | enum ImGuiLayoutType_
type ImGuiLogType (line 413) | enum ImGuiLogType
type ImGuiAxis (line 423) | enum ImGuiAxis
type ImGuiPlotType (line 430) | enum ImGuiPlotType
type ImGuiInputSource (line 436) | enum ImGuiInputSource
type ImGuiInputReadMode (line 447) | enum ImGuiInputReadMode
type ImGuiNavHighlightFlags_ (line 457) | enum ImGuiNavHighlightFlags_
type ImGuiNavDirSourceFlags_ (line 466) | enum ImGuiNavDirSourceFlags_
type ImGuiNavMoveFlags_ (line 474) | enum ImGuiNavMoveFlags_
type ImGuiNavForward (line 485) | enum ImGuiNavForward
type ImGuiNavLayer (line 492) | enum ImGuiNavLayer
type ImGuiPopupPositionPolicy (line 499) | enum ImGuiPopupPositionPolicy
type ImVec1 (line 506) | struct ImVec1
method ImVec1 (line 509) | ImVec1() { x = 0.0f; }
method ImVec1 (line 510) | ImVec1(float _x) { x = _x; }
type ImVec2ih (line 514) | struct ImVec2ih
method ImVec2ih (line 517) | ImVec2ih() { x = y = 0; }
method ImVec2ih (line 518) | ImVec2ih(short _x, short _y) { x = _x; y = _y; }
function ImRect (line 523) | struct IMGUI_API ImRect
type ImGuiDataTypeInfo (line 558) | struct ImGuiDataTypeInfo
type ImGuiColorMod (line 566) | struct ImGuiColorMod
type ImGuiStyleMod (line 573) | struct ImGuiStyleMod
method ImGuiStyleMod (line 577) | ImGuiStyleMod(ImGuiStyleVar idx, int v) { VarIdx = idx; BackupInt[...
method ImGuiStyleMod (line 578) | ImGuiStyleMod(ImGuiStyleVar idx, float v) { VarIdx = idx; BackupFloa...
method ImGuiStyleMod (line 579) | ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v) { VarIdx = idx; BackupFloa...
type ImGuiGroupData (line 583) | struct ImGuiGroupData
function ImGuiMenuColumns (line 597) | struct IMGUI_API ImGuiMenuColumns
function ImGuiInputTextState (line 610) | struct IMGUI_API ImGuiInputTextState
type ImGuiWindowSettings (line 643) | struct ImGuiWindowSettings
method ImGuiWindowSettings (line 656) | ImGuiWindowSettings() { Name = NULL; ID = 0; Pos = Size = ViewportPos ...
type ImGuiSettingsHandler (line 659) | struct ImGuiSettingsHandler
method ImGuiSettingsHandler (line 668) | ImGuiSettingsHandler() { memset(this, 0, sizeof(*this)); }
type ImGuiPopupData (line 672) | struct ImGuiPopupData
method ImGuiPopupData (line 682) | ImGuiPopupData() { PopupId = 0; Window = SourceWindow = NULL; OpenFram...
type ImGuiColumnData (line 685) | struct ImGuiColumnData
method ImGuiColumnData (line 692) | ImGuiColumnData() { OffsetNorm = OffsetNormBeforeResize = 0.0f; Flag...
type ImGuiColumns (line 695) | struct ImGuiColumns
method ImGuiColumns (line 709) | ImGuiColumns() { Clear(); }
method Clear (line 710) | void Clear()
function ImDrawListSharedData (line 727) | struct IMGUI_API ImDrawListSharedData
type ImDrawDataBuilder (line 742) | struct ImDrawDataBuilder
method Clear (line 746) | void Clear() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n+...
method ClearFreeMemory (line 747) | void ClearFreeMemory() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n+...
type ImGuiViewportFlagsPrivate_ (line 751) | enum ImGuiViewportFlagsPrivate_
type ImGuiViewportP (line 758) | struct ImGuiViewportP : public ImGuiViewport
method ImGuiViewportP (line 778) | ImGuiViewportP() { Idx = -1; LastFrameActive = LastFrameDra...
method ImRect (line 780) | ImRect GetRect() const { return ImRect(Pos.x, Pos.y, Pos.x + Size...
method ImVec2 (line 781) | ImVec2 GetCenter() const { return ImVec2(Pos.x + Size.x * 0.5f, Pos...
method ClearRequestFlags (line 782) | void ClearRequestFlags() { PlatformRequestClose = PlatformRequestMo...
type ImGuiNavMoveResult (line 785) | struct ImGuiNavMoveResult
method ImGuiNavMoveResult (line 795) | ImGuiNavMoveResult() { Clear(); }
method Clear (line 796) | void Clear() { ID = SelectScopeId = 0; Window = NULL; DistBox ...
type ImGuiNextWindowData (line 800) | struct ImGuiNextWindowData
method ImGuiNextWindowData (line 826) | ImGuiNextWindowData()
method Clear (line 840) | void Clear()
type ImGuiTabBarSortItem (line 851) | struct ImGuiTabBarSortItem
type ImGuiTabBarRef (line 857) | struct ImGuiTabBarRef
method ImGuiTabBarRef (line 862) | ImGuiTabBarRef(ImGuiTabBar* ptr) { Ptr = ptr; IndexInMainPool =...
method ImGuiTabBarRef (line 863) | ImGuiTabBarRef(int index_in_main_pool) { Ptr = NULL; IndexInMainPool ...
type ImGuiDockNodeFlagsPrivate_ (line 866) | enum ImGuiDockNodeFlagsPrivate_
type ImGuiDataAuthority_ (line 879) | enum ImGuiDataAuthority_
type ImGuiDockNode (line 887) | struct ImGuiDockNode
method IsRootNode (line 927) | bool IsRootNode() const { return ParentNode ==...
method IsDockSpace (line 928) | bool IsDockSpace() const { return (LocalFlags &...
method IsCentralNode (line 929) | bool IsCentralNode() const { return (LocalFlags &...
method IsHiddenTabBar (line 930) | bool IsHiddenTabBar() const { return (LocalFlags &...
method IsNoTabBar (line 931) | bool IsNoTabBar() const { return (LocalFlags &...
method IsSplitNode (line 932) | bool IsSplitNode() const { return ChildNodes[0]...
method IsLeafNode (line 933) | bool IsLeafNode() const { return ChildNodes[0]...
meth
Condensed preview — 279 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,248K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 689,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: ''\n\n---\n\n**Describe the "
},
{
"path": ".github/ISSUE_TEMPLATE/design-change.md",
"chars": 601,
"preview": "---\nname: Design change\nabout: Suggest a design change for the project\ntitle: ''\nlabels: design change\nassignees: ''\n\n--"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 595,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/ISSUE_TEMPLATE/re-factor-request.md",
"chars": 589,
"preview": "---\nname: Re-factor request\nabout: Suggest a re-factor of code for the project\ntitle: ''\nlabels: code change\nassignees: "
},
{
"path": ".github/PULL_REQUEST_TEMPLATE/pull_request_template.md",
"chars": 152,
"preview": "**Description**\nGive a clear description of the changes\n\n**Issues**\nreference related issues if any\n\n**Possible conflict"
},
{
"path": ".gitignore",
"chars": 288,
"preview": "/build/\n/build_vs2017_arm/\n/build_vs2017_win64/\n/build_vs2019_win64/\n/build_vs2019_win32/\n/build_vs2017_win32/\n*.swp\n*.s"
},
{
"path": ".gitmodules",
"chars": 774,
"preview": "[submodule \"deps/fmt\"]\n\tpath = deps/fmt\n\turl = https://github.com/fmtlib/fmt.git\n[submodule \"deps/DirectXTex\"]\n\tpath = d"
},
{
"path": "CMakeLists.txt",
"chars": 11163,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nset_property(GLOBAL PROPERTY USE_FOLDERS ON)\nadd_compile_definitions(_ENABLE_EXTEN"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3355,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "Jenkinsfile",
"chars": 2580,
"preview": "pipeline {\n agent any\n stages {\n\t\tstage('Install'){\n\t\t\tsteps{\n\t\t\t\techo \"Running ${env.BUILD_ID} on ${env.JENKINS_U"
},
{
"path": "LICENSE",
"chars": 11516,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 5474,
"preview": "# [<img src=\"http://upload.vzout.com/wisp/logo.png\" width=\"40\"> WispRenderer](https://teamwisp.github.io) - Real-Time Ra"
},
{
"path": "imgui.ini",
"chars": 3131,
"preview": "[Window][DockspaceViewport_11111111]\r\nPos=0,21\r\nSize=1280,699\r\nCollapsed=0\r\n\r\n[Window][Debug##Default]\r\nPos=1022,401\r\nSi"
},
{
"path": "resources/alien_lights.json",
"chars": 1192,
"preview": "{\r\n \"lights\": [\r\n {\r\n \"angle\": 69.0,\r\n \"color\": [\r\n 0.0,\r\n "
},
{
"path": "resources/shaders/deferred_composition_pass.hlsl",
"chars": 5711,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/deferred_geometry_pass.hlsl",
"chars": 5558,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/denoising_SVGF.hlsl",
"chars": 15083,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/denoising_reflections.hlsl",
"chars": 15285,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/denoising_spatial_reconstruction.hlsl",
"chars": 7154,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_ambient_occlusion.hlsl",
"chars": 3662,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_functions.hlsl",
"chars": 2520,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_global.hlsl",
"chars": 1587,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_pathtracer_accumulation.hlsl",
"chars": 1582,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_pathtracer_entries.hlsl",
"chars": 3731,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_pathtracer_functions.hlsl",
"chars": 8191,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_pathtracer_main.hlsl",
"chars": 4017,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_raytracing.hlsl",
"chars": 8542,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_reflection_entries.hlsl",
"chars": 5221,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_reflection_functions.hlsl",
"chars": 5202,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_reflection_main.hlsl",
"chars": 4625,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_shadow_entries.hlsl",
"chars": 1275,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_shadow_functions.hlsl",
"chars": 2597,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_shadow_main.hlsl",
"chars": 3744,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_structs.hlsl",
"chars": 2300,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/dxr_texture_lod.hlsl",
"chars": 7169,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/fullscreen_quad.hlsl",
"chars": 1124,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/generate_mips_cs.hlsl",
"chars": 8338,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/lighting.hlsl",
"chars": 6679,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/material_util.hlsl",
"chars": 5778,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/math.hlsl",
"chars": 1311,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pbr_brdf_lut.hlsl",
"chars": 2056,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pbr_cubemap_conversion.hlsl",
"chars": 1905,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pbr_cubemap_convolution.hlsl",
"chars": 2463,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pbr_prefilter_env_map.hlsl",
"chars": 3211,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pbr_util.hlsl",
"chars": 7704,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_bloom_blur.hlsl",
"chars": 1944,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_bloom_blur_horizontal.hlsl",
"chars": 2677,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_bloom_blur_vertical.hlsl",
"chars": 2769,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_bloom_composition.hlsl",
"chars": 2329,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_bloom_extract_bright.hlsl",
"chars": 2022,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_bloom_util.hlsl",
"chars": 1077,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_bokeh.hlsl",
"chars": 4368,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_bokeh_post_filter.hlsl",
"chars": 2301,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_coc.hlsl",
"chars": 3536,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_composition.hlsl",
"chars": 2807,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_compute_near_mask.hlsl",
"chars": 2705,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_dilate.hlsl",
"chars": 1783,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_downscale.hlsl",
"chars": 2967,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_properties.hlsl",
"chars": 992,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_dof_util.hlsl",
"chars": 4856,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_fxaa.hlsl",
"chars": 4014,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_hdr_util.hlsl",
"chars": 5029,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_tonemapping.hlsl",
"chars": 2287,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/pp_util.hlsl",
"chars": 2985,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/shaders/rand_util.hlsl",
"chars": 4359,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "resources/sponza_lights.json",
"chars": 1583,
"preview": "{\r\n \"lights\": [\r\n {\r\n \"angle\": 69.0,\r\n \"color\": [\r\n 0.9999899864196777,\r\n"
},
{
"path": "resources/viknell_lights.json",
"chars": 999,
"preview": "{\r\n \"lights\": [\r\n {\r\n \"angle\": 69.0,\r\n \"color\": [\r\n 0.0,\r\n "
},
{
"path": "scripts/JenkinsWebhook.bat",
"chars": 300,
"preview": "@echo off\nset \"str=%~1\"\n\"C:\\Program Files\\cURL\\bin\\curl.exe\" -X POST --data \"{ \\\"content\\\": \\\"%str%\\\", \\\"username\\\": \\\"J"
},
{
"path": "src/constant_buffer_pool.cpp",
"chars": 1736,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/constant_buffer_pool.hpp",
"chars": 2305,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_acceleration_structure..cpp",
"chars": 20188,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_command_list.cpp",
"chars": 21812,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_command_queue.cpp",
"chars": 2188,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_constant_buffer_pool.cpp",
"chars": 3399,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_constant_buffer_pool.hpp",
"chars": 1842,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_defines.hpp",
"chars": 3163,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_descriptor_heap.cpp",
"chars": 3306,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_descriptors_allocations.cpp",
"chars": 12205,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_descriptors_allocations.hpp",
"chars": 7574,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_device.cpp",
"chars": 11337,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_dynamic_descriptor_heap.cpp",
"chars": 13599,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_dynamic_descriptor_heap.hpp",
"chars": 5974,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_enums.hpp",
"chars": 16765,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_fence.cpp",
"chars": 2272,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_functions.hpp",
"chars": 23061,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_heap.cpp",
"chars": 28662,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_indirect_command_buffer.cpp",
"chars": 2965,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_material_pool.cpp",
"chars": 1237,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_material_pool.hpp",
"chars": 1137,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_model_pool.cpp",
"chars": 64101,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_model_pool.hpp",
"chars": 5988,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_pipeline_state.cpp",
"chars": 6208,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_readback_buffer.cpp",
"chars": 2473,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_render_target.cpp",
"chars": 11910,
"preview": "/*!\r\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mei"
},
{
"path": "src/d3d12/d3d12_render_window.cpp",
"chars": 9850,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_renderer.cpp",
"chars": 48142,
"preview": "/*!\r\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mei"
},
{
"path": "src/d3d12/d3d12_renderer.hpp",
"chars": 10320,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_resource_pool_texture.cpp",
"chars": 34110,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_resource_pool_texture.hpp",
"chars": 6045,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_root_signature.cpp",
"chars": 5956,
"preview": "/*!\r\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mei"
},
{
"path": "src/d3d12/d3d12_rt_descriptor_heap.cpp",
"chars": 11948,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_rt_descriptor_heap.hpp",
"chars": 5961,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_settings.hpp",
"chars": 3531,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_shader.cpp",
"chars": 4149,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_shader_table.cpp",
"chars": 3345,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_staging_buffer.cpp",
"chars": 7062,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_state_object.cpp",
"chars": 5963,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_structs.hpp",
"chars": 11700,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_structured_buffer.cpp",
"chars": 1895,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_structured_buffer_pool.cpp",
"chars": 5008,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_structured_buffer_pool.hpp",
"chars": 2171,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_texture_resources.hpp",
"chars": 1766,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_textures.cpp",
"chars": 22281,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3d12_viewport.cpp",
"chars": 1728,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/d3d12/d3dx12.hpp",
"chars": 141967,
"preview": "//*********************************************************\n//\n// Copyright (c) Microsoft. All rights reserved.\n// This "
},
{
"path": "src/engine_registry.cpp",
"chars": 57238,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/engine_registry.hpp",
"chars": 33725,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/entry.hpp",
"chars": 1072,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/frame_graph/frame_graph.hpp",
"chars": 33132,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/id_factory.cpp",
"chars": 1206,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/id_factory.hpp",
"chars": 1263,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/imgui/ImGuizmo.cpp",
"chars": 78074,
"preview": "// The MIT License(MIT)\n//\n// Copyright(c) 2016 Cedric Guillemet\n//\n// Permission is hereby granted, free of charge, to "
},
{
"path": "src/imgui/ImGuizmo.h",
"chars": 7327,
"preview": "// https://github.com/CedricGuillemet/ImGuizmo\n// v 1.61 WIP\n//\n// The MIT License(MIT)\n// \n// Copyright(c) 2016 Cedric "
},
{
"path": "src/imgui/imconfig.hpp",
"chars": 5022,
"preview": "//-----------------------------------------------------------------------------\n// COMPILE-TIME OPTIONS FOR DEAR IMGUI\n/"
},
{
"path": "src/imgui/imgui.cpp",
"chars": 718875,
"preview": "// dear imgui, v1.70 WIP\n// (main code and documentation)\n\n// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp fo"
},
{
"path": "src/imgui/imgui.hpp",
"chars": 233529,
"preview": "// dear imgui, v1.70 WIP\n// (headers)\n\n// See imgui.cpp file for documentation.\n// Call and read ImGui::ShowDemoWindow()"
},
{
"path": "src/imgui/imgui_draw.cpp",
"chars": 186917,
"preview": "// dear imgui, v1.70 WIP\n// (drawing and font code)\n\n/*\n\nIndex of this file:\n\n// [SECTION] STB libraries implementation\n"
},
{
"path": "src/imgui/imgui_impl_dx12.cpp",
"chars": 33157,
"preview": "// dear imgui: Renderer for DirectX12\n// This needs to be used along with a Platform Binding (e.g. Win32)\n\n// Implemente"
},
{
"path": "src/imgui/imgui_impl_dx12.hpp",
"chars": 2068,
"preview": "// dear imgui: Renderer for DirectX12\n// This needs to be used along with a Platform Binding (e.g. Win32)\n\n// Implemente"
},
{
"path": "src/imgui/imgui_impl_win32.cpp",
"chars": 39343,
"preview": "// dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications)\n// This needs to be u"
},
{
"path": "src/imgui/imgui_impl_win32.hpp",
"chars": 1720,
"preview": "// dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications)\n// This needs to be u"
},
{
"path": "src/imgui/imgui_internal.hpp",
"chars": 128220,
"preview": "// dear imgui, v1.70 WIP\n// (internal structures/api)\n\n// You may use this file to debug, understand or extend ImGui fea"
},
{
"path": "src/imgui/imgui_widgets.cpp",
"chars": 341338,
"preview": "// dear imgui, v1.70 WIP\n// (widgets code)\n\n/*\n\nIndex of this file:\n\n// [SECTION] Forward Declarations\n// [SECTION] Widg"
},
{
"path": "src/imgui/imstb_rectpack.hpp",
"chars": 20262,
"preview": "// [DEAR IMGUI] \n// This is a slightly modified version of stb_rect_pack.h 0.99. \n// Those changes would need to be push"
},
{
"path": "src/imgui/imstb_textedit.hpp",
"chars": 53444,
"preview": "// [DEAR IMGUI] \n// This is a slightly modified version of stb_textedit.h 1.13. \n// Those changes would need to be pushe"
},
{
"path": "src/imgui/imstb_truetype.hpp",
"chars": 192417,
"preview": "// [DEAR IMGUI] \n// This is a slightly modified version of stb_truetype.h 1.20.\n// Mostly fixing for compiler and static"
},
{
"path": "src/imgui_graphics_settings.hpp",
"chars": 7013,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/imgui_tools.cpp",
"chars": 37349,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/imgui_tools.hpp",
"chars": 4776,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/material_pool.cpp",
"chars": 6427,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/material_pool.hpp",
"chars": 6379,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_loader.cpp",
"chars": 3281,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_loader.hpp",
"chars": 4718,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_loader_assimp.cpp",
"chars": 11167,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_loader_assimp.hpp",
"chars": 1427,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_loader_tinygltf.cpp",
"chars": 12019,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_loader_tinygltf.hpp",
"chars": 1338,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_pool.cpp",
"chars": 12625,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/model_pool.hpp",
"chars": 14465,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/pipeline_registry.cpp",
"chars": 939,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/pipeline_registry.hpp",
"chars": 2202,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/platform_independend_structs.hpp",
"chars": 2738,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/registry.hpp",
"chars": 2062,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_accumulation.hpp",
"chars": 6312,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_ansel.hpp",
"chars": 10542,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_bloom_composition.hpp",
"chars": 10076,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_bloom_extract_bright.hpp",
"chars": 9065,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_bloom_horizontal_blur.hpp",
"chars": 9173,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_bloom_vertical_blur.hpp",
"chars": 9963,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_brdf_lut_precalculation.hpp",
"chars": 4108,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_build_acceleration_structures.hpp",
"chars": 22091,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_cubemap_convolution.hpp",
"chars": 12823,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_deferred_composition.cpp",
"chars": 21137,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_deferred_composition.hpp",
"chars": 2860,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_deferred_main.hpp",
"chars": 5318,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_deferred_render_target_copy.hpp",
"chars": 3921,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_bokeh.hpp",
"chars": 11103,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_bokeh_postfilter.hpp",
"chars": 8893,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_coc.hpp",
"chars": 8181,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_composition.hpp",
"chars": 10505,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_compute_near_mask.hpp",
"chars": 7108,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_dilate_flatten.hpp",
"chars": 6997,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_dilate_flatten_second_pass.hpp",
"chars": 7031,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_dof_dilate_near.hpp",
"chars": 6794,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_down_scale.hpp",
"chars": 8813,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_equirect_to_cubemap.hpp",
"chars": 14116,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_hbao.hpp",
"chars": 11051,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_imgui_render_task.hpp",
"chars": 7216,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_path_tracer.hpp",
"chars": 22897,
"preview": "/*!\r\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mei"
},
{
"path": "src/render_tasks/d3d12_post_processing.hpp",
"chars": 6996,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_raytracing_task.hpp",
"chars": 18770,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_reflection_denoiser.hpp",
"chars": 32616,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_rt_hybrid_helpers.hpp",
"chars": 6588,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_rt_reflection_task.hpp",
"chars": 17419,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_rt_shadow_task.hpp",
"chars": 17667,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_rtao_task.hpp",
"chars": 13033,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_shadow_denoiser_task.hpp",
"chars": 30867,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/render_tasks/d3d12_spatial_reconstruction.hpp",
"chars": 8914,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/renderer.cpp",
"chars": 1014,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/renderer.hpp",
"chars": 5879,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/resource_pool_texture.cpp",
"chars": 1905,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/resource_pool_texture.hpp",
"chars": 2763,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/root_signature_registry.cpp",
"chars": 1182,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/root_signature_registry.hpp",
"chars": 1625,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/rt_pipeline_registry.cpp",
"chars": 954,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/rt_pipeline_registry.hpp",
"chars": 1934,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/scene_graph/camera_node.cpp",
"chars": 6163,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/scene_graph/camera_node.hpp",
"chars": 4087,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/scene_graph/light_node.cpp",
"chars": 3281,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
},
{
"path": "src/scene_graph/light_node.hpp",
"chars": 2290,
"preview": "/*!\n * Copyright 2019 Breda University of Applied Sciences and Team Wisp (Viktor Zoutman, Emilio Laiso, Jens Hagen, Mein"
}
]
// ... and 79 more files (download for full content)
About this extraction
This page contains the full source code of the TeamWisp/WispRenderer GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 279 files (3.9 MB), approximately 1.0M tokens, and a symbol index with 2935 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.