Skip to content

Commit 2896787

Browse files
committed
Defined recursion depth in shared header and replaced hardcoded value
1 parent 9f5b435 commit 2896787

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraForestSER/D3D12RaytracingSakuraForestSER.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ void D3D12RaytracingSakuraForestSER::CreateRaytracingPipelineStateObject()
648648
// Pipeline config
649649
// Defines the maximum TraceRay() recursion depth.
650650
auto pipelineConfig = raytracingPipeline.CreateSubobject<CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT>();
651-
UINT maxRecursionDepth = 2;
651+
UINT maxRecursionDepth = MAX_RECURSION_DEPTH;
652652
pipelineConfig->Config(maxRecursionDepth);
653653

654654
#if _DEBUG

Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraForestSER/RayTracingHlslCompat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#ifndef RAYTRACINGHLSLCOMPAT_H
1313
#define RAYTRACINGHLSLCOMPAT_H
14+
#define MAX_RECURSION_DEPTH 2
1415

1516
#ifdef HLSL
1617
#include "HlslCompat.h"

Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraForestSER/Raytracing.hlsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#define HLSL
1616
#include "RaytracingHlslCompat.h"
1717
#include "Star.hlsli"
18-
#define MAX_RECURSION_DEPTH 2
1918

2019
using namespace dx;
2120
RaytracingAccelerationStructure Scene : register(t0, space0);

0 commit comments

Comments
 (0)