-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Initial commit for SER Sakura Scene with toggle #919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new D3D12 Raytracing sample (“Sakura Scene”) demonstrating Shader Execution Reordering (SER) with multiple materials and toggleable sorting modes.
- Adds a complete sample project (headers, source, shaders, build files) for the SER-enabled Sakura scene
- Enhances HLSL raygen and closest-hit shaders to separate materials and apply SER based on HitObject, materialID, or both
- Provides README updates with controls and usage instructions
Reviewed Changes
Copilot reviewed 26 out of 33 changed files in this pull request and generated no comments.
File | Description |
---|---|
stdafx.h | New precompiled header pulling in core and D3D12 dependencies for the sample |
Raytracing.hlsl | Implements SER toggles and per-material closest-hit shaders for diverse materials |
readme.md | Documents sample usage, UI controls, and command-line options |
Comments suppressed due to low confidence (4)
Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraScene/readme.md:22
- Add a line for the 'R' key since the sample description mentions toggling camera rotation (e.g.,
* R - toggles camera rotation on/off.
).
* S - toggles shader execution reordering on/off.
Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraScene/D3D12RaytracingSakuraScene.h:115
- [nitpick] Member variable
m_ObjModelLoader
uses an uppercase ‘O’ after the prefix; considerm_objModelLoader
for consistency with otherm_
members.
ObjModelLoader m_ObjModelLoader;
Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraScene/D3D12RaytracingSakuraScene.h:157
- [nitpick] The prefix
tcube
is inconsistent withtransparentCube
; consider renaming toc_transparentCubeClosestHitShaderName
to match the hit-group constant.
static const wchar_t* c_tcubeClosestHitShaderName;
Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraScene/D3D12RaytracingSakuraScene.vcxproj.filters:62
- The project references
CheckCast.h
but this header is not added in the diff; remove the reference or include the missing file to avoid build errors.
<ClInclude Include="CheckCast.h" />
…nt object spacings to better illustrate SER divergence
Implemented a more diverse scene that demonstrates the integration of Shader Execution Reordering (SER) to showcase performance gains: