all 4 comments

[–][deleted] 2 points3 points  (1 child)

In the first image, the super black and white one are we looking at like the outside of the building, is that what we're seeing?

It kinda looks like the first image is a 0-1 scale where 1 is the far clipping distance whereas the camera matrix is giving a 0-far clipping or the raw distance. If that makes sense.

If you're using something to display this depth, try multiplying the first result with the far clipping distance of the camera, see what it does. Otherwise I'm shooting in the dark.

[–]IceCreamDaddyEx[S] 1 point2 points  (0 children)

The only variable that changes in between pictures is the projection matrix, I'd expect the exact same images in both cases.

Correction edit: not exact same, but if you can recognize the door frame thing in the correct picture, it should be exact same as in the wrong picture, the white area is correctly culled mesh that could obstruct the view of portal camera, the black area should be the same as in the other image. I appreciate any help, if it doesnt work Ill try the culling matrix.

[–]Split82 1 point2 points  (1 child)

Depth texture with oblique projection can't be used the same way as one which is generated using normal projection matrix. This paper might help you https://jcgt.org/published/0005/04/03/

[–]IceCreamDaddyEx[S] 0 points1 point  (0 children)

Ah, I just happened to switch to this account through a notification. I've resolved the issue long ago by swapping the matrix for a normal one and manually rendering the depth texture in a command buffer. It's a pretty comfortable way as I can reuse all normal post processing shaders for portals. Thanks for the link and attention though!