Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How do I save the camera depth texture?

Discussion in 'Scripting' started by leofreitasa, Aug 9, 2022.

  1. leofreitasa

    leofreitasa

    Joined:
    Jul 19, 2022
    Posts:
    3
    I've tried saving the render texture with ReadPixels and setting the color format to DEPTH_AUTO but it doesn't work, the image that gets saved is just a solid gray, does anyone know what's happening/how to fix it?
     
  2. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    777
  3. leofreitasa

    leofreitasa

    Joined:
    Jul 19, 2022
    Posts:
    3
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,951
    Let me understand this.

    - you came here to post a question
    - @arfish found what appears to be a solution
    - you say you don't have the time to learn right now
    - instead you want some stranger to create you a different solution in that same timeframe, one that you "don't have to learn."

    I wish you the best of luck.
     
  5. leofreitasa

    leofreitasa

    Joined:
    Jul 19, 2022
    Posts:
    3
    Nope, hoping that someone knows what's wrong with my solution, the other person suggested a different thing