From f64c9f473ccb15eedc48ea9e4ec575e6d470fae6 Mon Sep 17 00:00:00 2001 From: Turanszki Janos Date: Fri, 1 Nov 2024 14:42:54 +0100 Subject: [PATCH] fix for odd graphical flickering on AMD --- WickedEngine/shaders/lightCullingCS.hlsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WickedEngine/shaders/lightCullingCS.hlsl b/WickedEngine/shaders/lightCullingCS.hlsl index 1299f7f63..435eebf11 100644 --- a/WickedEngine/shaders/lightCullingCS.hlsl +++ b/WickedEngine/shaders/lightCullingCS.hlsl @@ -127,6 +127,8 @@ void main(uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : float fMinDepth = asfloat(uMaxDepth); float fMaxDepth = asfloat(uMinDepth); + fMaxDepth = max(0.000001, fMaxDepth); // fix for AMD!!!!!!!!! + Frustum GroupFrustum; AABB GroupAABB; // frustum AABB around min-max depth in View Space AABB GroupAABB_WS; // frustum AABB in world space