Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

RenderTexture issue

Discussion in 'General Graphics' started by ilya_ca, Jul 30, 2015.

  1. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    Hi, I have a camera, that renders plain white color on a black background to a render texture (by setting a Target Texture). Everything looks great in the preview window; however the actual texture always comes out in really strange colors:





    The second one was taken on a different PC, it even has some gradation, and honestly it looks like some sort of depth map to me.

    How can I make sure, that the RenderTexture actually gets what the camera sees?

    Thanks!
     
    Last edited: Jul 30, 2015
  2. Cherno

    Cherno

    Joined:
    Apr 7, 2013
    Posts:
    515
    Try switching the Color space from Linear to Gamma, or vice versa.
     
  3. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    It turned out that the render texture format was set to depth. Reverting it to ARGB32 fixed the problem.