Search Unity

Construct depth

Discussion in 'General Graphics' started by Avol, Jan 14, 2017.

  1. Avol

    Avol

    Joined:
    May 27, 2016
    Posts:
    95
    Hi there, I'm trying to construct depth values from linear iteration.
    for (int i=0; i < 64; i++)
    {
    float linearDepth = i / 64;
    float pDepth = perspDepth(linearDepth );
    }
    where pDepth would be perspective depth as stored in depth buffer.
    Any captain would be appreciated :)