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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Rendering a Depth + Normal texture at half res

Discussion in 'General Graphics' started by jamius19, Jan 1, 2018.

  1. jamius19

    jamius19

    Joined:
    Mar 30, 2015
    Posts:
    96
    I want to write an image effect that requires both depth and normal maps.
    But the thing is I don't require the native res texture the camera is supplying me.
    How can I get the current depth + normal texture at half res?

    Any help is appreciated!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,248
    Render it yourself with a replacement shader pass and a render texture of the resolution you need / want. The built in camera depth normals texture is already rendered in a similar fashion, so the built in depth normals shader can be reused if you wish.

    https://docs.unity3d.com/Manual/SL-ShaderReplacement.html
     
    jamius19 likes this.
  3. jamius19

    jamius19

    Joined:
    Mar 30, 2015
    Posts:
    96
    Thanks for the valuable info's. :D
    Much appreciated!