I've tried both the built-in unity ambient occlusion that comes with the post-processing stack, as well as another one ported from the Microsoft MiniEngine by someone: https://github.com/keijiro/MiniEngineAO.
Both of them have the same issue pictured below with these dark lines and the occlusion on the faces around the lines seem to flicker as the camera moves.
I've been trying to solve this issue by using the Microsoft MiniEngine AO and changing the compute shader. In one of my attempts, I changed the output of the shader from the calculated occlusion:
Occlusion[OutPixel] = lerp(1, ao, gIntensity);
to the depth texture UV to be sampled: Occlusion[OutPixel] = QuadCenterUV.x;
(QuadCenterUV probably being the center of the UV to sample for the 4 depth texture samples:)
// Fetch four depths and store them in LDS #ifdef INTERLEAVE_RESULT float4 depths = DepthTex.Gather(samplerDepthTex, float3(QuadCenterUV, DTid.z)); #else float4 depths = DepthTex.Gather(samplerDepthTex, QuadCenterUV); With a similar effect on the Y axis. I think that may be the cause, as the distortion of the UVs matches the distortion of the effect.
I don't know how to fix this, because I don't have enough knowledge about RWBuffers or compute shaders.
My terrain is generated by a noise function as a 2D array, constructed into a mesh, the mesh runs Mesh.RecalculateNormals(), and then is sent to the Mesh Filter.
What is the issue here, and how can I fix it, or can anyone fix it for me?

