diff --git a/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl b/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl index 6d8c29a6e2..331af91e19 100644 --- a/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl +++ b/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl @@ -91,7 +91,7 @@ namespace Stride.Rendering.Images // Hash function used in the HPG12 AlchemyAO paper int linearDepthInt = (int)linearDepth; //float randomPatternRotationAngle = (3 * screenPosition.x ^ screenPosition.y + screenPosition.x * screenPosition.y) * 10; - float randomPatternRotationAngle = (15 * linearDepthInt + 3 * screenPosition.x ^ 2 * screenPosition.y + screenPosition.x * screenPosition.y) * 10; + float randomPatternRotationAngle = ((15 * linearDepthInt + 3 * screenPosition.x ^ 2 * screenPosition.y + screenPosition.x * screenPosition.y) & 0x0000FFFF) * 10; //***************************** // Choose a sample radius proportional to the projected area of the half-sphere diff --git a/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl.cs b/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl.cs index 19d68f34a8..37508455b8 100644 --- a/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl.cs +++ b/sources/engine/Stride.Rendering/Rendering/Images/AmbientOcclusion/AmbientOcclusionRawAOShader.sdsl.cs @@ -1,4 +1,4 @@ -// +// // Do not edit this file yourself! // // This code was generated by Stride Shader Mixin Code Generator.