diff --git a/Assets/Scripts/Core/Fsr3UpscalerContext.cs b/Assets/Scripts/Core/Fsr3UpscalerContext.cs index 69a603a..6b0b8f8 100644 --- a/Assets/Scripts/Core/Fsr3UpscalerContext.cs +++ b/Assets/Scripts/Core/Fsr3UpscalerContext.cs @@ -204,8 +204,8 @@ namespace FidelityFX const int threadGroupWorkRegionDim = 8; int dispatchSrcX = (UpscalerConsts.renderSize.x + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; int dispatchSrcY = (UpscalerConsts.renderSize.y + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; - int dispatchDstX = (_contextDescription.MaxUpscaleSize.x + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; - int dispatchDstY = (_contextDescription.MaxUpscaleSize.y + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; + int dispatchDstX = (UpscalerConsts.upscaleSize.x + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; + int dispatchDstY = (UpscalerConsts.upscaleSize.y + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; int dispatchShadingChangePassX = ((UpscalerConsts.renderSize.x / 2) + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; int dispatchShadingChangePassY = ((UpscalerConsts.renderSize.y / 2) + (threadGroupWorkRegionDim - 1)) / threadGroupWorkRegionDim; @@ -344,7 +344,7 @@ namespace FidelityFX } // To be updated if resource is larger than the actual image size - constants.downscaleFactor = new Vector2((float)constants.renderSize.x / _contextDescription.MaxUpscaleSize.x, (float)constants.renderSize.y / _contextDescription.MaxUpscaleSize.y); + constants.downscaleFactor = new Vector2((float)constants.renderSize.x / constants.upscaleSize.x, (float)constants.renderSize.y / constants.upscaleSize.y); // Calculate pre-exposure relevant factors constants.deltaPreExposure = 1.0f; diff --git a/Assets/Scripts/Fsr3UpscalerImageEffect.cs b/Assets/Scripts/Fsr3UpscalerImageEffect.cs index e71c873..d22a336 100644 --- a/Assets/Scripts/Fsr3UpscalerImageEffect.cs +++ b/Assets/Scripts/Fsr3UpscalerImageEffect.cs @@ -391,7 +391,7 @@ namespace FidelityFX _renderCamera.ResetProjectionMatrix(); // Update the input resource descriptions - _dispatchDescription.UpscaleSize = new Vector2Int(src.width, src.height); + _dispatchDescription.UpscaleSize = new Vector2Int(_renderCamera.pixelWidth, _renderCamera.pixelHeight); _dispatchCommandBuffer.Clear();