Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove max atlas probe alloc size in HDRP asset #458

Merged
merged 2 commits into from
May 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed max alloc planar size not taking in account the max cache size
  • Loading branch information
alelievr committed May 13, 2020
commit 505fa34bb55787a7cd216e59dc8b3fc36f60aab5
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ public void Initialize(HDRenderPipelineAsset hdrpAsset, RenderPipelineResources
// For planar reflection we only convolve with the GGX filter, otherwise it would be too expensive
GraphicsFormat planarProbeCacheFormat = lightLoopSettings.planarReflectionCacheCompressed ? GraphicsFormat.RGB_BC6H_SFloat : GraphicsFormat.R16G16B16A16_SFloat;
int reflectionPlanarResolution = (int)lightLoopSettings.planarReflectionAtlasSize;
if (PlanarReflectionProbeCache.GetApproxCacheSizeInByte(1, reflectionPlanarResolution, planarProbeCacheFormat) > k_MaxCacheSize)
reflectionPlanarResolution = PlanarReflectionProbeCache.GetMaxCacheSizeForWeightInByte(k_MaxCacheSize, planarProbeCacheFormat);
reflectionPlanarProbeCache = new PlanarReflectionProbeCache(defaultResources, (IBLFilterGGX)iBLFilterBSDFArray[0], reflectionPlanarResolution, planarProbeCacheFormat, true);
}

Expand Down