"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Depthbuffer show backside of cylinder target

I am reading out the depthbuffer in a shader (see code below). When looking at the result it seems that the backside of my cylinder target is drawn to the depth buffer, instead of the front side. (see attached image) Am I generating the texture coordinates (suv) correct?

Vertex shader: v2f o; o.vertex = UnityObjectToClipPos(v.vertex); o.screenPos = ComputeScreenPos(o.vertex);

Fragment shader: float2 suv = i.screenPos.xy / i.screenPos.w; float depth = tex2D(_CameraDepthTexture, suv).r; return fixed4(depth, 0, 0, 1);

 

-- Dag Magne

I found that switching shader for the cylinder-target from the default "unlit" to a "standard" shader fixed my problem.