Browse Source

A bit of comment cleanup

mac-autoexp
Nico de Poel 3 years ago
parent
commit
8cd818a3d9
  1. 8
      Assets/Scripts/Fsr2Context.cs

8
Assets/Scripts/Fsr2Context.cs

@ -130,7 +130,7 @@ namespace FidelityFX
bool resetAccumulation = dispatchParams.Reset || _firstExecution; bool resetAccumulation = dispatchParams.Reset || _firstExecution;
_firstExecution = false; _firstExecution = false;
// if auto exposure is enabled use the auto exposure SRV, otherwise what the app sends.
// If auto exposure is enabled use the auto exposure SRV, otherwise what the app sends
if ((_contextDescription.Flags & Fsr2.InitializationFlags.EnableAutoExposure) != 0) if ((_contextDescription.Flags & Fsr2.InitializationFlags.EnableAutoExposure) != 0)
dispatchParams.Exposure = _resources.AutoExposure; dispatchParams.Exposure = _resources.AutoExposure;
else if (dispatchParams.Exposure == null) else if (dispatchParams.Exposure == null)
@ -149,7 +149,7 @@ namespace FidelityFX
int dispatchDstX = (_contextDescription.DisplaySize.x + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; int dispatchDstX = (_contextDescription.DisplaySize.x + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim;
int dispatchDstY = (_contextDescription.DisplaySize.y + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; int dispatchDstY = (_contextDescription.DisplaySize.y + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim;
// Clear reconstructed depth for max depth store.
// Clear reconstructed depth for max depth store
if (resetAccumulation) if (resetAccumulation)
{ {
commandBuffer.SetRenderTarget(_resources.LockStatus[frameIndex ^ 1]); commandBuffer.SetRenderTarget(_resources.LockStatus[frameIndex ^ 1]);
@ -238,9 +238,7 @@ namespace FidelityFX
constants.jitterOffset = dispatchParams.JitterOffset; constants.jitterOffset = dispatchParams.JitterOffset;
constants.renderSize = dispatchParams.RenderSize; constants.renderSize = dispatchParams.RenderSize;
constants.maxRenderSize = _contextDescription.MaxRenderSize; constants.maxRenderSize = _contextDescription.MaxRenderSize;
constants.inputColorResourceDimensions = dispatchParams.InputResourceSize; // We have no way to query the actual width & height of the input resources, so trust that it matches the render size
// TODO: if we want to support dynamic resolution, we may have to differentiate between renderSize and inputColorResourceDimensions again
// TODO: come to think of it, couldn't we use Unity's ScalableBufferManager for dealing with render scale altogether? So we don't have to deal with this nasty double camera business?
constants.inputColorResourceDimensions = dispatchParams.InputResourceSize;
// Compute the horizontal FOV for the shader from the vertical one // Compute the horizontal FOV for the shader from the vertical one
float aspectRatio = (float)dispatchParams.RenderSize.x / dispatchParams.RenderSize.y; float aspectRatio = (float)dispatchParams.RenderSize.x / dispatchParams.RenderSize.y;

Loading…
Cancel
Save