Search Unity

Question Is there any way to sample depth with mipmaps?

Discussion in 'Shader Graph' started by Passeridae, Oct 10, 2021.

  1. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    A question to SG team.
    How do I sample lower mipmaps of the depth buffer?
    Scene Depth node already contains all the mips because they are stored as an atlas side by side with mip0. But it's set up to show only the highest mip. Maybe there's some function that can correctly offset screen coordinates so it could shift to other mips?
    Also, maybe I can access lower mips in a custom pass and then write the result to the custom depth buffer?
    Any help would be appreciated.
    Thanks!