text: baseName = "frame78"
  scenePath = "VPLMedia/bunny/Tutorial78.pyscene"
  from falcor import *
  
  photonPathCount = 25000000
  perFramePathCount = 10000
  
  def render_graph_vbnl(pPhotonPathCount, pPerFramePathCount):
      g = RenderGraph('g')
      loadRenderPassLibrary('SceneDebugger.dll')
      loadRenderPassLibrary('BSDFViewer.dll')
      loadRenderPassLibrary('AccumulatePass.dll')
      loadRenderPassLibrary('DepthPass.dll')
      loadRenderPassLibrary('Antialiasing.dll')
      loadRenderPassLibrary('GBufferSlim.dll')
      loadRenderPassLibrary('BlitPass.dll')
      loadRenderPassLibrary('DebugPasses.dll')
      loadRenderPassLibrary('CSM.dll')
      loadRenderPassLibrary('MinimalPathTracer.dll')
      loadRenderPassLibrary('DirectLighting.dll')
      loadRenderPassLibrary('ErrorMeasurePass.dll')
      loadRenderPassLibrary('ForwardLightingPass.dll')
      loadRenderPassLibrary('VirtualLightGeneratePass.dll')
      loadRenderPassLibrary('GBuffer.dll')
      loadRenderPassLibrary('ImageLoader.dll')
      loadRenderPassLibrary('MegakernelPathTracer.dll')
      loadRenderPassLibrary('PassLibraryTemplate.dll')
      loadRenderPassLibrary('PixelInspectorPass.dll')
      loadRenderPassLibrary('PrepareLights.dll')
      loadRenderPassLibrary('RichVPL.dll')
      loadRenderPassLibrary('ReSTIRPass.dll')
      loadRenderPassLibrary('RISPass.dll')
      loadRenderPassLibrary('SampleEliminatePass.dll')
      loadRenderPassLibrary('SimplePathTracer.dll')
      loadRenderPassLibrary('SSAO.dll')
      loadRenderPassLibrary('SkyBox.dll')
      loadRenderPassLibrary('SVGFPass.dll')
      loadRenderPassLibrary('TemporalDelayPass.dll')
      loadRenderPassLibrary('ToneMapper.dll')
      loadRenderPassLibrary('Utils.dll')
      loadRenderPassLibrary('VirtualLightEstimatePass.dll')
      loadRenderPassLibrary('VirtualLightVisPass.dll')
      loadRenderPassLibrary('WhittedRayTracer.dll')
      GBufferSlim = createPass('GBufferSlim')
      g.addPass(GBufferSlim, 'GBufferSlim')
      ToneMapper = createPass('ToneMapper', {'exposureCompensation': 0.0, 'autoExposure': False, 'filmSpeed': 100.0, 'whiteBalance': False, 'whitePoint': 6500.0, 'operator': ToneMapOp.Aces, 'clamp': True, 'whiteMaxLuminance': 1.0, 'whiteScale': 11.199999809265137, 'fNumber': 1.0, 'shutter': 1.0, 'exposureMode': ExposureMode.AperturePriority})
      g.addPass(ToneMapper, 'ToneMapper')
      AccumulatePass = createPass('AccumulatePass', {'enableAccumulation': True, 'autoReset': True, 'precisionMode': AccumulatePrecision.Single, 'subFrameCount': 0})
      g.addPass(AccumulatePass, 'AccumulatePass')
      VirtualLightVisPass = createPass('VirtualLightVisPass', {'radius': 0.004000000189989805, 'visMode': 0, 'visType': 7, 'enable': True})
      g.addPass(VirtualLightVisPass, 'VirtualLightVisPass')
      VirtualLightGeneratePass_ = createPass('VirtualLightGeneratePass', {'TileSize': 1, 'TileSampleNum': 3, 'boundBoxRadius': 0.006000000052154064, 'EnableVSDxPath': True, 'EnableVDSxPath': True, 'EnableVDDxPath': True, 'EnableVSSxPath': True, 'StartFromLights': False, 'PhotonPathCount': 20000})
      g.addPass(VirtualLightGeneratePass_, 'VirtualLightGeneratePass_')
      VirtualLightEstimatePass = createPass('VirtualLightEstimatePass', {'Photon Path Count': pPhotonPathCount, 'Per Frame Path Count': pPerFramePathCount, 'Texture Item Size': 16, 'MegaTexture Capacity': 100000, 'Convert Incoming To Outgoing': True, 'Former Version': False, 'Seperate BRDF': True})
      g.addPass(VirtualLightEstimatePass, 'VirtualLightEstimatePass')
      SampleEliminatePass = createPass('SampleEliminatePass', {'ratio': 0.10000000149011612, 'radiusSearchRange': 0.20000000298023224, 'radiusSearchCount': 100, 'radius': 0.150000001192092896, 'uniformSE': False, 'radiusScalerForASBuilding': 1.100000023841858, 'useDMaxForASBuilding': True, 'useParallelSE': False})
      g.addPass(SampleEliminatePass, 'SampleEliminatePass')
      ReSTIRPass = createPass('ReSTIRPass', {'enableVSLEvaluation': True, 'enableTemporalResampling': True, 'enableSpatialResampling': True, 'GroundtruthMode': 2, 'enableDirectLighting': True, 'needUsageCount': False, 'enablePresampling': True, 'VSLRadiusFactor': 5.0 })
      g.addPass(ReSTIRPass, 'ReSTIRPass')
      PrepareLights = createPass('PrepareLights')
      g.addPass(PrepareLights, 'PrepareLights')
      g.addEdge('PrepareLights.output', 'ReSTIRPass.input')
      g.addEdge('SampleEliminatePass.output', 'VirtualLightEstimatePass.input')
      g.addEdge('AccumulatePass.output', 'ToneMapper.src')
      g.addEdge('VirtualLightGeneratePass_.output', 'SampleEliminatePass.input')
      g.addEdge('GBufferSlim.output', 'VirtualLightGeneratePass_.input')
      g.addEdge('ReSTIRPass.output', 'AccumulatePass.input')
      g.addEdge('VirtualLightEstimatePass.output', 'VirtualLightVisPass.dummy')
      g.addEdge('VirtualLightEstimatePass.output', 'PrepareLights.input')
      g.markOutput('ToneMapper.dst')
      g.markOutput('VirtualLightVisPass.output')
      return g
  
  g = render_graph_vbnl(photonPathCount, perFramePathCount)
  try: m.addGraph(g)
  except NameError: None
  
  prepareFrame = int(photonPathCount / perFramePathCount) + 2
  
  m.loadScene(scenePath)
  
  captureTime = 5000
  m.clock.exitFrame = prepareFrame + captureTime + 1
  m.frameCapture.outputDir = "../../../Scripts/BunnyAnimation/"
  m.frameCapture.baseFilename = baseName
  m.frameCapture.addFrames(m.activeGraph, [prepareFrame + captureTime])