Skip to content

Commit

Permalink
More fixes for lowest amount of allowed rays per probe
Browse files Browse the repository at this point in the history
  • Loading branch information
Duttenheim committed Jan 17, 2025
1 parent fd97fe7 commit 3042c09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/render/gi/ddgicontext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ DDGIContext::SetupVolume(const Graphics::GraphicsEntityId id, const VolumeSetup&
#if NEBULA_GRAPHICS_DEBUG
radianceCreateInfo.name = Util::String::Sprintf("%s Radiance", volumeName.c_str());
#endif
radianceCreateInfo.width = setup.numRaysPerProbe;
radianceCreateInfo.width = volume.numRaysPerProbe;
radianceCreateInfo.height = setup.numProbesX * setup.numProbesY * setup.numProbesZ;
radianceCreateInfo.format = CoreGraphics::PixelFormat::R32G32B32A32F;
radianceCreateInfo.usage = CoreGraphics::TextureUsage::ReadWriteTexture;
Expand Down Expand Up @@ -533,9 +533,9 @@ DDGIContext::SetupVolume(const Graphics::GraphicsEntityId id, const VolumeSetup&
scrollSpaceCreateInfo.usage = CoreGraphics::TextureUsage::ReadWriteTexture;
volume.scrollSpace = CoreGraphics::CreateTexture(scrollSpaceCreateInfo);

for (uint rayIndex = 0; rayIndex < setup.numRaysPerProbe; rayIndex++)
for (uint rayIndex = 0; rayIndex < volume.numRaysPerProbe; rayIndex++)
{
SphericalFibonacci(rayIndex, setup.numRaysPerProbe).store(volume.volumeConstants.Directions[rayIndex]);
SphericalFibonacci(rayIndex, volume.numRaysPerProbe).store(volume.volumeConstants.Directions[rayIndex]);
}

// Store another set of minimal ray directions for probe activity updates
Expand All @@ -545,9 +545,9 @@ DDGIContext::SetupVolume(const Graphics::GraphicsEntityId id, const VolumeSetup&
}

// Store another set of minimal ray directions for probe activity updates
for (uint rayIndex = 0; rayIndex < setup.numRaysPerProbe - ProbeUpdate::DDGI_NUM_FIXED_RAYS; rayIndex++)
for (uint rayIndex = 0; rayIndex < volume.numRaysPerProbe - ProbeUpdate::DDGI_NUM_FIXED_RAYS; rayIndex++)
{
SphericalFibonacci(rayIndex, setup.numRaysPerProbe - ProbeUpdate::DDGI_NUM_FIXED_RAYS).store(volume.volumeConstants.ExtraDirections[rayIndex]);
SphericalFibonacci(rayIndex, volume.numRaysPerProbe - ProbeUpdate::DDGI_NUM_FIXED_RAYS).store(volume.volumeConstants.ExtraDirections[rayIndex]);
}

volume.volumeConstants.ProbeIrradiance = CoreGraphics::TextureGetBindlessHandle(volume.irradiance);
Expand Down

0 comments on commit 3042c09

Please sign in to comment.