diff --git a/Content/Shaders/Utils/Culling.flax b/Content/Shaders/Utils/Culling.flax index 5789b00b1..c9f74fec1 100644 --- a/Content/Shaders/Utils/Culling.flax +++ b/Content/Shaders/Utils/Culling.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:23c5c44dab35c72e364f7d4a51694759267bde8aa3aea7ef3aecd061f926ac5f -size 4322 +oid sha256:75cf9fad5fd4a125020664ba607cf81b54f3cd4aeab8921d7132f572a1aed15c +size 4449 diff --git a/Content/Shaders/Utils/MultiScaler.flax b/Content/Shaders/Utils/MultiScaler.flax index ede322b5e..6284f9f9b 100644 --- a/Content/Shaders/Utils/MultiScaler.flax +++ b/Content/Shaders/Utils/MultiScaler.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d671350d8c4e689c697b169e9878bc388aaef89d31d839702370d66d52cdc1c5 -size 9629 +oid sha256:3075677a09f4c980832930e939dd342e7a394077ab4c42113b65e14d71833e96 +size 9625 diff --git a/Source/Shaders/Utils/Culling.shader b/Source/Shaders/Utils/Culling.shader index f00a2b467..3f2f4b29c 100644 --- a/Source/Shaders/Utils/Culling.shader +++ b/Source/Shaders/Utils/Culling.shader @@ -75,7 +75,7 @@ void CS_HZBCull(uint DispatchThreadId : SV_DispatchThreadID) } // Calculate Hi-Z buffer mip (assumes HZB is power of two) -#if VULKAN || defined(WGSL) || 1 +#if VULKAN || defined(WGSL) // For some reason, Vulkan needs different mip selection math float2 pixelSize = RTSize * (maxUV - minUV) * 2.0f; float mip = floor(log2(max(max(pixelSize.x, pixelSize.y), 1.0f))); #else @@ -85,6 +85,7 @@ void CS_HZBCull(uint DispatchThreadId : SV_DispatchThreadID) mip = clamp(mip, 0, MaxMipLevel); float4 boundsUVs = float4(minUV, maxUV); +#if 0 // TODO: figure out why it causes minor artifacts (eg. in Bistro) // Texel footprint for the lower (finer-grained) level float mipUp = max(mip - 1, 0); float2 scale = exp2(-mipUp); @@ -95,6 +96,7 @@ void CS_HZBCull(uint DispatchThreadId : SV_DispatchThreadID) // Use the lower level if we only touch <= 2 texels in both dimensions if (dims.x <= 2 && dims.y <= 2) mip = mipUp; +#endif // Load depths from Hi-Z buffer float4 depths = {