Search Unity

Reading pixelsfrom ARGBHalf render texture

Discussion in 'Scripting' started by jcabeleira, Feb 9, 2011.

  1. jcabeleira

    jcabeleira

    Joined:
    Jan 3, 2011
    Posts:
    13
    Hey guys, I've found out that render textures support an half-float format. I can render to a texture using this format but now I need to access its contents and output them to a file for external processing. The tradional way to do this would be to copy the image to a Texture2D using Texture2D.ReadPixels, but unfortunately Texture2D does not support the half float format and so the copy would remove the HDR from the data.
    So, how can I get the pixels from a render texture that uses the ARGBHalf format?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Basically, you can't

    Their purpose is primarily if not only at the time for usage in shaders (post fx - shader replacement)