Already struggling multiple days on this and finally decided to ask around.
My unity project is based on a 2D Renderer asset and yes I did in fact activate it on the camera, pipeline asset and also on the 2d renderering data thingy.
My material shader also has ZWrite On and is directly writing to the depth texture with:
half4 CombinedShapeLightFragment(v2f i, out float depth : SV_Depth) : SV_Target
{
depth = 1.0;
fixed4 c = tex2D(_MainTex, i.texcoord) * i.color;
c.rgb *= c.a;
return c;
}
This also doesnt work. Still a black texture (It isnt all the way black, it has a hex value of 040404).
I also looked over the frame debugger and it sais that the depth texture is only 16x16 big.
Btw Im accessing the depth texture with Linear01Depth otherwise its gray.
Thanks in advance. Im really struggling…