Skip to content

Commit 2ac45fd

Browse files
committed
ReSTIR FG V1.03
1 parent c50fda2 commit 2ac45fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2470
-251
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
/external/packman/
1313
/tools/.packman/
1414

15+
#Kitchen and Bistro model
16+
/Models/Bistro_ReSTIRFG/
17+
/Models/Kitchen_ReSTIRFG/
18+
1519
# IDE folders.
1620
/.vs/
1721
/.vscode/

Models/ReSTIR_FG_Bistro.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Graphs
2+
from pathlib import WindowsPath, PosixPath
3+
from falcor import *
4+
5+
def render_graph_ReSTIR_FG():
6+
g = RenderGraph('ReSTIR_FG')
7+
g.create_pass('AccumulatePass', 'AccumulatePass', {'enabled': False, 'outputSize': 'Default', 'autoReset': True, 'precisionMode': 'Single', 'maxFrameCount': 0, 'overflowMode': 'Stop'})
8+
g.create_pass('ToneMapper', 'ToneMapper', {'outputSize': 'Default', 'useSceneMetadata': True, 'exposureCompensation': 0.0, 'autoExposure': False, 'filmSpeed': 100.0, 'whiteBalance': False, 'whitePoint': 6500.0, 'operator': 'Linear', 'clamp': True, 'whiteMaxLuminance': 1.0, 'whiteScale': 11.199999809265137, 'fNumber': 1.0, 'shutter': 1.0, 'exposureMode': 'AperturePriority'})
9+
g.create_pass('VBufferRT', 'VBufferRT', {'outputSize': 'Default', 'samplePattern': 'Center', 'sampleCount': 16, 'useAlphaTest': True, 'adjustShadingNormals': True, 'forceCullMode': False, 'cull': 'Back', 'useTraceRayInline': False, 'useDOF': True})
10+
g.create_pass('ReSTIR_FG', 'ReSTIR_FG', {'PhotonBufferSizeGlobal': 400000, 'PhotonBufferSizeCaustic': 100000, 'AnalyticEmissiveRatio': 0.3499999940395355, 'PhotonBouncesGlobal': 10, 'PhotonBouncesCaustic': 10, 'PhotonRadiusGlobal': 0.019999999552965164, 'PhotonRadiusCaustic': 0.008500000461935997, 'EnableStochCollect': True, 'StochCollectK': 3, 'EnablePhotonCullingGlobal': False, 'EnablePhotonCullingCaustic': False, 'CullingRadius': 0.10000000149011612, 'CullingBits': 20, 'CausticCollectionMode': 3, 'CausticResamplingMode': 2, 'EnableDynamicDispatch': True, 'NumDispatchedPhotons': 1263104})
11+
g.add_edge('AccumulatePass.output', 'ToneMapper.src')
12+
g.add_edge('VBufferRT.mvec', 'ReSTIR_FG.mvec')
13+
g.add_edge('VBufferRT.vbuffer', 'ReSTIR_FG.vbuffer')
14+
g.add_edge('ReSTIR_FG.color', 'AccumulatePass.input')
15+
g.mark_output('ToneMapper.dst')
16+
g.mark_output('AccumulatePass.output')
17+
return g
18+
m.addGraph(render_graph_ReSTIR_FG())
19+
20+
# Scene
21+
m.loadScene('Bistro_ReSTIRFG/BistroInterior_Wine_EmissiveLight.pyscene')
22+
m.scene.renderSettings = SceneRenderSettings(useEnvLight=True, useAnalyticLights=True, useEmissiveLights=True, useGridVolumes=True, diffuseAlbedoMultiplier=1)
23+
m.scene.camera.position = float3(0.675186, 4.154675, -2.284865)
24+
m.scene.camera.target = float3(1.602494, 3.902547, -2.561509)
25+
m.scene.camera.up = float3(0.000859, 1.000000, -0.000256)
26+
m.scene.cameraSpeed = 1.0
27+
28+
# Window Configuration
29+
m.resizeFrameBuffer(1920, 1080)
30+
m.ui = True
31+
32+
# Clock Settings
33+
m.clock.time = 0
34+
m.clock.framerate = 0
35+
# If framerate is not zero, you can use the frame property to set the start frame
36+
# m.clock.frame = 0
37+
38+
# Frame Capture
39+
m.frameCapture.outputDir = '.'
40+
m.frameCapture.baseFilename = 'Mogwai'
41+

Models/ReSTIR_FG_Kitchen.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Graphs
2+
from pathlib import WindowsPath, PosixPath
3+
from falcor import *
4+
5+
def render_graph_ReSTIR_FG():
6+
g = RenderGraph('ReSTIR_FG')
7+
g.create_pass('AccumulatePass', 'AccumulatePass', {'enabled': False, 'outputSize': 'Default', 'autoReset': True, 'precisionMode': 'Single', 'maxFrameCount': 0, 'overflowMode': 'Stop'})
8+
g.create_pass('ToneMapper', 'ToneMapper', {'outputSize': 'Default', 'useSceneMetadata': True, 'exposureCompensation': 0.0, 'autoExposure': False, 'filmSpeed': 100.0, 'whiteBalance': False, 'whitePoint': 6500.0, 'operator': 'Linear', 'clamp': True, 'whiteMaxLuminance': 1.0, 'whiteScale': 11.199999809265137, 'fNumber': 1.0, 'shutter': 1.0, 'exposureMode': 'AperturePriority'})
9+
g.create_pass('VBufferRT', 'VBufferRT', {'outputSize': 'Default', 'samplePattern': 'Center', 'sampleCount': 16, 'useAlphaTest': True, 'adjustShadingNormals': True, 'forceCullMode': False, 'cull': 'Back', 'useTraceRayInline': False, 'useDOF': True})
10+
g.create_pass('ReSTIR_FG', 'ReSTIR_FG', {'PhotonBufferSizeGlobal': 800000, 'PhotonBufferSizeCaustic': 400000, 'AnalyticEmissiveRatio': 0.3499999940395355, 'PhotonBouncesGlobal': 10, 'PhotonBouncesCaustic': 10, 'PhotonRadiusGlobal': 0.01600000075995922, 'PhotonRadiusCaustic': 0.004000000189989805, 'EnableStochCollect': True, 'StochCollectK': 3, 'EnablePhotonCullingGlobal': True, 'EnablePhotonCullingCaustic': True, 'CullingRadius': 0.10000000149011612, 'CullingBits': 20, 'CausticCollectionMode': 3, 'CausticResamplingMode': 2, 'EnableDynamicDispatch': False, 'NumDispatchedPhotons': 1199616})
11+
g.add_edge('AccumulatePass.output', 'ToneMapper.src')
12+
g.add_edge('VBufferRT.mvec', 'ReSTIR_FG.mvec')
13+
g.add_edge('VBufferRT.vbuffer', 'ReSTIR_FG.vbuffer')
14+
g.add_edge('ReSTIR_FG.color', 'AccumulatePass.input')
15+
g.mark_output('ToneMapper.dst')
16+
g.mark_output('AccumulatePass.output')
17+
return g
18+
m.addGraph(render_graph_ReSTIR_FG())
19+
20+
# Scene
21+
m.loadScene('Kitchen_ReSTIRFG/KitchenReSTIRFG.pyscene')
22+
m.scene.renderSettings = SceneRenderSettings(useEnvLight=True, useAnalyticLights=True, useEmissiveLights=True, useGridVolumes=True, diffuseAlbedoMultiplier=1)
23+
m.scene.cameraSpeed = 1.0
24+
25+
# Window Configuration
26+
m.resizeFrameBuffer(1920, 1080)
27+
m.ui = True
28+
29+
# Clock Settings
30+
m.clock.time = 0
31+
m.clock.framerate = 0
32+
# If framerate is not zero, you can use the frame property to set the start frame
33+
# m.clock.frame = 0
34+
35+
# Frame Capture
36+
m.frameCapture.outputDir = '.'
37+
m.frameCapture.baseFilename = 'Mogwai'
38+

Models/ReSTIR_FG_NRD_Bistro.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Graphs
2+
from pathlib import WindowsPath, PosixPath
3+
from falcor import *
4+
5+
def render_graph_ReSTIR_FG_NRD():
6+
g = RenderGraph('ReSTIR_FG_NRD')
7+
g.create_pass('ModulateIllumination', 'ModulateIllumination', {'useEmission': True, 'useDiffuseReflectance': True, 'useDiffuseRadiance': True, 'useSpecularReflectance': True, 'useSpecularRadiance': True, 'useDeltaReflectionEmission': False, 'useDeltaReflectionReflectance': False, 'useDeltaReflectionRadiance': False, 'useDeltaTransmissionEmission': False, 'useDeltaTransmissionReflectance': False, 'useDeltaTransmissionRadiance': False, 'useResidualRadiance': True, 'outputSize': 'Default', 'useDebug': True, 'inputInYCoCg': False})
8+
g.create_pass('AccumulatePass', 'AccumulatePass', {'enabled': False, 'outputSize': 'Default', 'autoReset': True, 'precisionMode': 'Single', 'maxFrameCount': 0, 'overflowMode': 'Stop'})
9+
g.create_pass('DLSSPass', 'DLSSPass', {'enabled': True, 'outputSize': 'Default', 'profile': 'Balanced', 'motionVectorScale': 'Relative', 'isHDR': True, 'useJitteredMV': False, 'sharpness': 0.0, 'exposure': 0.0})
10+
g.create_pass('ReSTIR_FG', 'ReSTIR_FG', {'PhotonBufferSizeGlobal': 400000, 'PhotonBufferSizeCaustic': 100000, 'AnalyticEmissiveRatio': 0.3499999940395355, 'PhotonBouncesGlobal': 10, 'PhotonBouncesCaustic': 10, 'PhotonRadiusGlobal': 0.019999999552965164, 'PhotonRadiusCaustic': 0.008500000461935997, 'EnableStochCollect': True, 'StochCollectK': 3, 'EnablePhotonCullingGlobal': False, 'EnablePhotonCullingCaustic': False, 'CullingRadius': 0.10000000149011612, 'CullingBits': 20, 'CausticCollectionMode': 3, 'CausticResamplingMode': 2, 'EnableDynamicDispatch': True, 'NumDispatchedPhotons': 1263104})
11+
g.create_pass('NRD', 'NRD_Normal', {'enabled': True, 'method': 'RelaxDiffuseSpecular', 'outputSize': 'Default', 'worldSpaceMotion': True, 'disocclusionThreshold': 2.0, 'maxIntensity': 250.0, 'RelaxAntilagAccelerationAmount': 0.30000001192092896, 'RelaxAntilagSpatialSigmaScale': 4.0, 'RelaxAntilagTemporalSigmaScale': 0.20000000298023224, 'RelaxAntilagResetAmount': 0.699999988079071, 'RelaxDiffusePrepassBlurRadius': 16.0, 'RelaxSpecularPrepassBlurRadius': 16.0, 'RelaxDiffuseMaxAccumulatedFrameNum': 40, 'RelaxSpecularMaxAccumulatedFrameNum': 40, 'RelaxEnableAntiFirefly': True})
12+
g.create_pass('GBufferRT', 'GBufferRT', {'outputSize': 'Default', 'samplePattern': 'Center', 'sampleCount': 16, 'useAlphaTest': True, 'adjustShadingNormals': True, 'forceCullMode': False, 'cull': 'Back', 'texLOD': 'Mip0', 'useTraceRayInline': False, 'useDOF': True})
13+
g.create_pass('ToneMapper', 'ToneMapper', {'outputSize': 'Default', 'useSceneMetadata': True, 'exposureCompensation': 0.0, 'autoExposure': False, 'filmSpeed': 100.0, 'whiteBalance': False, 'whitePoint': 6500.0, 'operator': 'Linear', 'clamp': True, 'whiteMaxLuminance': 1.0, 'whiteScale': 11.199999809265137, 'fNumber': 1.0, 'shutter': 1.0, 'exposureMode': 'AperturePriority'})
14+
g.add_edge('ReSTIR_FG.residualRadiance', 'ModulateIllumination.residualRadiance')
15+
g.add_edge('AccumulatePass.output', 'ToneMapper.src')
16+
g.add_edge('NRD.filteredSpecularRadianceHitDist', 'ModulateIllumination.specularRadiance')
17+
g.add_edge('ReSTIR_FG.emission', 'ModulateIllumination.emission')
18+
g.add_edge('ReSTIR_FG.diffuseReflectance', 'ModulateIllumination.diffuseReflectance')
19+
g.add_edge('ReSTIR_FG.specularReflectance', 'ModulateIllumination.specularReflectance')
20+
g.add_edge('NRD.filteredDiffuseRadianceHitDist', 'ModulateIllumination.diffuseRadiance')
21+
g.add_edge('ReSTIR_FG.diffuseRadiance', 'NRD.diffuseRadianceHitDist')
22+
g.add_edge('ReSTIR_FG.specularRadiance', 'NRD.specularRadianceHitDist')
23+
g.add_edge('GBufferRT.linearZ', 'NRD.viewZ')
24+
g.add_edge('GBufferRT.normWRoughnessMaterialID', 'NRD.normWRoughnessMaterialID')
25+
g.add_edge('ModulateIllumination.output', 'DLSSPass.color')
26+
g.add_edge('DLSSPass.output', 'AccumulatePass.input')
27+
g.add_edge('GBufferRT.depth', 'DLSSPass.depth')
28+
g.add_edge('GBufferRT.mvecW', 'NRD.mvec')
29+
g.add_edge('GBufferRT.mvec', 'DLSSPass.mvec')
30+
g.add_edge('GBufferRT.vbuffer', 'ReSTIR_FG.vbuffer')
31+
g.add_edge('GBufferRT.mvec', 'ReSTIR_FG.mvec')
32+
g.add_edge('NRD.outValidation', 'ModulateIllumination.debugLayer')
33+
g.mark_output('ToneMapper.dst')
34+
g.mark_output('AccumulatePass.output')
35+
return g
36+
m.addGraph(render_graph_ReSTIR_FG_NRD())
37+
38+
# Scene
39+
m.loadScene('Bistro_ReSTIRFG/BistroInterior_Wine_EmissiveLight.pyscene')
40+
m.scene.renderSettings = SceneRenderSettings(useEnvLight=True, useAnalyticLights=True, useEmissiveLights=True, useGridVolumes=True, diffuseAlbedoMultiplier=1)
41+
m.scene.camera.position = float3(0.675186, 4.154675, -2.284865)
42+
m.scene.camera.target = float3(1.602494, 3.902547, -2.561509)
43+
m.scene.camera.up = float3(0.000859, 1.000000, -0.000256)
44+
m.scene.cameraSpeed = 1.0
45+
46+
# Window Configuration
47+
m.resizeFrameBuffer(1920, 1080)
48+
m.ui = True
49+
50+
# Clock Settings
51+
m.clock.time = 0
52+
m.clock.framerate = 0
53+
# If framerate is not zero, you can use the frame property to set the start frame
54+
# m.clock.frame = 0
55+
56+
# Frame Capture
57+
m.frameCapture.outputDir = '.'
58+
m.frameCapture.baseFilename = 'Mogwai'
59+

Models/ReSTIR_FG_NRD_Kitchen.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Graphs
2+
from pathlib import WindowsPath, PosixPath
3+
from falcor import *
4+
5+
def render_graph_ReSTIR_FG_NRD():
6+
g = RenderGraph('ReSTIR_FG_NRD')
7+
g.create_pass('ModulateIllumination', 'ModulateIllumination', {'useEmission': True, 'useDiffuseReflectance': True, 'useDiffuseRadiance': True, 'useSpecularReflectance': True, 'useSpecularRadiance': True, 'useDeltaReflectionEmission': False, 'useDeltaReflectionReflectance': False, 'useDeltaReflectionRadiance': False, 'useDeltaTransmissionEmission': False, 'useDeltaTransmissionReflectance': False, 'useDeltaTransmissionRadiance': False, 'useResidualRadiance': True, 'outputSize': 'Default', 'useDebug': True, 'inputInYCoCg': False})
8+
g.create_pass('AccumulatePass', 'AccumulatePass', {'enabled': False, 'outputSize': 'Default', 'autoReset': True, 'precisionMode': 'Single', 'maxFrameCount': 0, 'overflowMode': 'Stop'})
9+
g.create_pass('DLSSPass', 'DLSSPass', {'enabled': True, 'outputSize': 'Default', 'profile': 'Balanced', 'motionVectorScale': 'Relative', 'isHDR': True, 'useJitteredMV': False, 'sharpness': 0.0, 'exposure': 0.0})
10+
g.create_pass('ReSTIR_FG', 'ReSTIR_FG', {'PhotonBufferSizeGlobal': 800000, 'PhotonBufferSizeCaustic': 400000, 'AnalyticEmissiveRatio': 0.3499999940395355, 'PhotonBouncesGlobal': 10, 'PhotonBouncesCaustic': 10, 'PhotonRadiusGlobal': 0.01600000075995922, 'PhotonRadiusCaustic': 0.004000000189989805, 'EnableStochCollect': True, 'StochCollectK': 3, 'EnablePhotonCullingGlobal': True, 'EnablePhotonCullingCaustic': True, 'CullingRadius': 0.10000000149011612, 'CullingBits': 20, 'CausticCollectionMode': 3, 'CausticResamplingMode': 2, 'EnableDynamicDispatch': False, 'NumDispatchedPhotons': 1199616})
11+
g.create_pass('NRD', 'NRD_Normal', {'enabled': True, 'method': 'RelaxDiffuseSpecular', 'outputSize': 'Default', 'worldSpaceMotion': True, 'disocclusionThreshold': 2.0, 'maxIntensity': 250.0, 'RelaxAntilagAccelerationAmount': 0.30000001192092896, 'RelaxAntilagSpatialSigmaScale': 4.0, 'RelaxAntilagTemporalSigmaScale': 0.20000000298023224, 'RelaxAntilagResetAmount': 0.699999988079071, 'RelaxDiffusePrepassBlurRadius': 16.0, 'RelaxSpecularPrepassBlurRadius': 16.0, 'RelaxDiffuseMaxAccumulatedFrameNum': 40, 'RelaxSpecularMaxAccumulatedFrameNum': 40, 'RelaxEnableAntiFirefly': True})
12+
g.create_pass('GBufferRT', 'GBufferRT', {'outputSize': 'Default', 'samplePattern': 'Center', 'sampleCount': 16, 'useAlphaTest': True, 'adjustShadingNormals': True, 'forceCullMode': False, 'cull': 'Back', 'texLOD': 'Mip0', 'useTraceRayInline': False, 'useDOF': True})
13+
g.create_pass('ToneMapper', 'ToneMapper', {'outputSize': 'Default', 'useSceneMetadata': True, 'exposureCompensation': 0.0, 'autoExposure': False, 'filmSpeed': 100.0, 'whiteBalance': False, 'whitePoint': 6500.0, 'operator': 'Aces', 'clamp': True, 'whiteMaxLuminance': 1.0, 'whiteScale': 11.199999809265137, 'fNumber': 1.0, 'shutter': 1.0, 'exposureMode': 'AperturePriority'})
14+
g.add_edge('ReSTIR_FG.residualRadiance', 'ModulateIllumination.residualRadiance')
15+
g.add_edge('AccumulatePass.output', 'ToneMapper.src')
16+
g.add_edge('NRD.filteredSpecularRadianceHitDist', 'ModulateIllumination.specularRadiance')
17+
g.add_edge('ReSTIR_FG.emission', 'ModulateIllumination.emission')
18+
g.add_edge('ReSTIR_FG.diffuseReflectance', 'ModulateIllumination.diffuseReflectance')
19+
g.add_edge('ReSTIR_FG.specularReflectance', 'ModulateIllumination.specularReflectance')
20+
g.add_edge('NRD.filteredDiffuseRadianceHitDist', 'ModulateIllumination.diffuseRadiance')
21+
g.add_edge('ReSTIR_FG.diffuseRadiance', 'NRD.diffuseRadianceHitDist')
22+
g.add_edge('ReSTIR_FG.specularRadiance', 'NRD.specularRadianceHitDist')
23+
g.add_edge('GBufferRT.linearZ', 'NRD.viewZ')
24+
g.add_edge('GBufferRT.normWRoughnessMaterialID', 'NRD.normWRoughnessMaterialID')
25+
g.add_edge('ModulateIllumination.output', 'DLSSPass.color')
26+
g.add_edge('DLSSPass.output', 'AccumulatePass.input')
27+
g.add_edge('GBufferRT.depth', 'DLSSPass.depth')
28+
g.add_edge('GBufferRT.mvecW', 'NRD.mvec')
29+
g.add_edge('GBufferRT.mvec', 'DLSSPass.mvec')
30+
g.add_edge('GBufferRT.vbuffer', 'ReSTIR_FG.vbuffer')
31+
g.add_edge('GBufferRT.mvec', 'ReSTIR_FG.mvec')
32+
g.add_edge('NRD.outValidation', 'ModulateIllumination.debugLayer')
33+
g.mark_output('ToneMapper.dst')
34+
g.mark_output('AccumulatePass.output')
35+
return g
36+
m.addGraph(render_graph_ReSTIR_FG_NRD())
37+
38+
# Scene
39+
m.loadScene('Kitchen_ReSTIRFG/KitchenReSTIRFG.pyscene')
40+
m.scene.renderSettings = SceneRenderSettings(useEnvLight=True, useAnalyticLights=True, useEmissiveLights=True, useGridVolumes=True, diffuseAlbedoMultiplier=1)
41+
m.scene.cameraSpeed = 1.0
42+
43+
# Window Configuration
44+
m.resizeFrameBuffer(1920, 1080)
45+
m.ui = True
46+
47+
# Clock Settings
48+
m.clock.time = 0
49+
m.clock.framerate = 0
50+
# If framerate is not zero, you can use the frame property to set the start frame
51+
# m.clock.frame = 0
52+
53+
# Frame Capture
54+
m.frameCapture.outputDir = '.'
55+
m.frameCapture.baseFilename = 'Mogwai'
56+

0 commit comments

Comments
 (0)