Skip to content

update to dev latest#2365

Closed
jiayev wants to merge 112 commits into
community-shaders:devfrom
jiayev:raytracing-plugin
Closed

update to dev latest#2365
jiayev wants to merge 112 commits into
community-shaders:devfrom
jiayev:raytracing-plugin

Conversation

@jiayev
Copy link
Copy Markdown
Collaborator

@jiayev jiayev commented May 17, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added ray tracing support with multiple rendering modes and denoising options
    • Added DirectX 12 interoperability for enhanced graphics performance
    • Added Scene Graph Explorer tool for debugging scene hierarchies
  • Enhancements

    • Improved upscaling pipeline with enhanced ray reconstruction support
    • Extended dynamic resolution support across rendering features
  • Documentation

    • Added comprehensive development guidance and build documentation

Review Change Stack

Gistix and others added 27 commits April 12, 2026 21:58
happens in debug build
@jiayev jiayev closed this May 17, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 82afa43a-299c-433b-94b5-53d34003c463

📥 Commits

Reviewing files that changed from the base of the PR and between 8c9b18c and a057825.

⛔ Files ignored due to path filters (2)
  • features/Upscaling/Shaders/Upscaling/Streamline/nvngx_dlssd.dll is excluded by !**/*.dll
  • features/Upscaling/Shaders/Upscaling/Streamline/sl.dlss_d.dll is excluded by !**/*.dll
📒 Files selected for processing (46)
  • AGENTS.md
  • extern/NRD
  • features/DX12 Interop/CORE
  • features/DX12 Interop/Shaders/Features/DX12Interop.ini
  • features/Raytracing/Shaders/Features/Raytracing.ini
  • features/Raytracing/Shaders/Raytracing/ConvertTexturesCS.hlsl
  • features/Raytracing/Shaders/Raytracing/CopyDepthMotionVector.hlsl
  • features/Raytracing/Shaders/Raytracing/CubeToHemiCS.hlsl
  • features/Raytracing/Shaders/Raytracing/GICompositeCS.hlsl
  • features/Raytracing/Shaders/Raytracing/Includes/Common.hlsli
  • features/Raytracing/Shaders/Raytracing/Includes/VanillaToPBR.hlsli
  • features/Raytracing/Shaders/Raytracing/PTCompositeCS.hlsl
  • features/SceneGraph Explorer/Shaders/Features/SceneGraphExplorer.ini
  • features/Upscaling/Shaders/Upscaling/CopyDepthCS.hlsl
  • features/Upscaling/Shaders/Upscaling/EncodeTexturesCS.hlsl
  • package/Shaders/Common/SharedData.hlsli
  • package/Shaders/DeferredCompositeCS.hlsl
  • package/Shaders/Lighting.hlsl
  • src/Deferred.cpp
  • src/Feature.cpp
  • src/FeatureBuffer.cpp
  • src/Features/DX12Interop.cpp
  • src/Features/DX12Interop.h
  • src/Features/DX12Interop/WrappedResource.cpp
  • src/Features/DX12Interop/WrappedResource.h
  • src/Features/InverseSquareLighting.cpp
  • src/Features/PerformanceOverlay.cpp
  • src/Features/Raytracing.cpp
  • src/Features/Raytracing.h
  • src/Features/SceneGraphExplorer.cpp
  • src/Features/SceneGraphExplorer.h
  • src/Features/Upscaling.cpp
  • src/Features/Upscaling.h
  • src/Features/Upscaling/DX12SwapChain.cpp
  • src/Features/Upscaling/DX12SwapChain.h
  • src/Features/Upscaling/FidelityFX.cpp
  • src/Features/Upscaling/Streamline.cpp
  • src/Features/Upscaling/Streamline.h
  • src/Features/VolumetricShadows.h
  • src/Globals.cpp
  • src/Globals.h
  • src/Hooks.cpp
  • src/Hooks.h
  • src/State.cpp
  • src/Utils/Game.cpp
  • src/Utils/Game.h

📝 Walkthrough

Walkthrough

This PR introduces a comprehensive raytracing feature alongside Direct3D 12 interoperability infrastructure, refactoring the upscaling pipeline to support DLSS Ray Reconstruction and path-tracing modes. Three new overlay features are added (Raytracing, DX12Interop, SceneGraphExplorer), compute shaders handle global illumination and path-tracing composition, deferred rendering integrates metallic/AO output for raytracing, and the upscaling encoder is split from the upscaler with dynamic shader variant caching for path-tracing and DLSS_RR support.

Changes

Raytracing with DX12 Interop and Upscaling

Layer / File(s) Summary
Direct3D 12 Interop Infrastructure
src/Features/DX12Interop.h, src/Features/DX12Interop.cpp, src/Features/DX12Interop/WrappedResource.h, src/Features/DX12Interop/WrappedResource.cpp
Implements D3D11↔D3D12 fence-based synchronization, templated Fence() and Execute() helpers for coordinating cross-API GPU work, WrappedResource wrapper for shared textures, PIX capture support, and D3D12 device creation with debug layer configuration.
Raytracing Feature Definition and Lifecycle
src/Features/Raytracing.h, src/Features/Raytracing.cpp
Declares and implements the Raytracing overlay feature with JSON-serializable settings for mode, denoiser, reblur, material, lighting, ReSTIR GI, and experimental controls; provides settings UI, activation gates, and event-driven initialization hooks; loads CreationEngineRaytracing.dll and resolves exported function pointers.
Raytracing GPU Resources and Compute Passes
features/Raytracing/Shaders/Raytracing/*.hlsl, features/Raytracing/Shaders/Raytracing/Includes/*.hlsli
Allocates DX11 textures and DX12 shared resources; implements compute shaders for sky hemisphere conversion (CubeToHemiCS), G-buffer texture conversion (ConvertTexturesCS), depth/motion-vector copy (CopyDepthMotionVector), and GI/PT composition (GICompositeCS, PTCompositeCS); includes HLSL helpers for vanilla-to-PBR conversions.
Deferred Rendering and Lighting Shader Integration
src/Deferred.cpp, package/Shaders/Lighting.hlsl, package/Shaders/Common/SharedData.hlsli, package/Shaders/DeferredCompositeCS.hlsl
Updates deferred rendering to allocate MASKS2 render target with shared resource flag when raytracing is active; adds MetallicAO output target to Lighting shader; implements early-exit for path-tracing fragments; adds VanillaToPBR material conversion for roughness; introduces RaytracingSettings struct into feature buffer with reflection/ambient/albedo controls; gates SSGI compilation when raytracing is enabled.
Upscaling Method Restructuring and Shader Caching
src/Features/Upscaling.h, src/Features/Upscaling.cpp (shader caching section)
Converts UpscaleMethod from enum class to flag-based enum supporting DLSS_RR; refactors encode-texture shader storage from fixed array to unordered-map-based caching with separate PATH_TRACING and depth-output variants; adds GetEncodeTexturesCS(bool pathTracing) and GetCopyDepthCS(bool pathTracing) accessors with shader variant compilation/selection.
Upscaling Pipeline DX12 Integration and Encoder Refactoring
src/Features/Upscaling.cpp, src/Features/Upscaling.h
Splits upscaling into separate EncodeTextures() and Upscale() passes; adds DX12 mode flag and backend device setters (SetBackendD3D11Device, SetBackendD3D12Device); integrates DX12 interop initialization; implements dynamic method selection with Raytracing-driven DLSS_RR resolution; refactors UAV and resource binding logic per upscale method; updates shader UI to hide user DLSS_RR selection and show it as engine-controlled.
Streamline DLSS_RR and D3D12 Evaluation Support
src/Features/Upscaling/Streamline.h, src/Features/Upscaling/Streamline.cpp
Extends Streamline with D3D12 command-list-based EvaluateDLSS/EvaluateDLSSD overloads; implements SetDLSSDOptions helper for quality/preset mapping; switches from featureDLSS boolean to flag-based loadedFeatures mask for feature availability; gates D3D11 upscaling with critical-level error when called in D3D12 mode; adds dynamic feature list building including DLSS_RR when raytracing and D3D12 mode are active.
DX12 Swap Chain and Frame Generation Integration
src/Features/Upscaling/DX12SwapChain.h, src/Features/Upscaling/DX12SwapChain.cpp, src/Features/Upscaling/FidelityFX.cpp
Refactors DX12SwapChain to use shared globals::features::dx12Interop device/queue/command-list infrastructure instead of local member storage; removes CreateD3D12Device and CreateSharedResources declarations; updates Present() to route copy/transition work through dx12Interop.Execute() lambdas; integrates FidelityFX frame generation with shared DX12Interop resources.
Scene Graph Explorer Overlay Feature
src/Features/SceneGraphExplorer.h, src/Features/SceneGraphExplorer.cpp
Implements a lightweight ImGui-based overlay for recursive scene-graph visualization, displaying node RTTI names, world positions, controller references, and extra data entries in a collapsible tree structure; supports enable/disable toggle via settings.
Global Feature Registration, Hooks, and Utility Updates
src/Globals.h, src/Globals.cpp, src/Hooks.h, src/Hooks.cpp, src/Feature.cpp, src/FeatureBuffer.cpp, src/State.cpp, src/Utils/Game.h, src/Utils/Game.cpp
Declares and instantiates global DX12Interop, Raytracing, SceneGraphExplorer features; registers them in Feature::GetFeatureList(); initializes DX12 interop at device creation time; implements CubemapResolution() helper for dynamic sky cubemap sizing based on Raytracing load; adds GetDynamicResolutionRatio() utility; incorporates raytracing buffer data into feature buffer; reorders deferred resource setup before feature setup; updates PerformanceOverlay VRAM calculation, InverseSquareLighting flag synchronization, and VolumetricShadows struct alignment.
Development Documentation and Configuration
AGENTS.md, features/DX12\ Interop/Shaders/Features/DX12Interop.ini, features/Raytracing/Shaders/Features/Raytracing.ini, features/SceneGraph\ Explorer/Shaders/Features/SceneGraphExplorer.ini, extern/NRD
Adds comprehensive AGENTS.md development guide covering build instructions, CMake presets, architecture overview, core dependencies, feature patterns, and AI assistant engineering standards; adds feature version INI configuration files; updates NRD submodule to new commit.
Upscaling Compute Shader Updates for Path Tracing
features/Upscaling/Shaders/Upscaling/EncodeTexturesCS.hlsl, features/Upscaling/Shaders/Upscaling/CopyDepthCS.hlsl
Adds PATH_TRACING-conditional texture resources (PTMotionVectors, PTColor, PTDepth); refactors depth/motion-vector source selection based on PTColor.a alpha threshold; expands DLSS condition to include DLSS_RR; updates reactive mask computation formula; implements CopyDepthCS with optional PT depth replacement based on alpha.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • alandtse
  • doodlum

Poem

🐰 Whiskers twitch with glee—a feast of rays!
Rays traced through frames in marvelous new ways,
From D3D's dance twixt Eleven and Twelve,
Where DLSS shines in this upscaling delve,
Hops to the finish line, GPU dreams achieved!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

@github-actions
Copy link
Copy Markdown

Actionable Suggestions

  • Performance Overlay (Jiaye): Needs version bump to 1-1-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants