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. Dismiss Notice

implementing HDR + 8xMSAA workaround with RGBM - problem with graphics.blit to back to hdr

Discussion in 'Shaders' started by OlliQueck, Dec 7, 2016.

  1. OlliQueck

    OlliQueck

    Joined:
    Apr 11, 2013
    Posts:
    49
    hey, since MSAA is my anti aliasing of choice for Virtual Reality i'm trying to work out some old game engine style fake-HDR to have great image effects later on.
    Encoding standard shaders to RGBM works nicely, i can also decode them back to a RGB image with a higher range via an image effect. Problem is since i use MSAA i can't use HDR on my camera. Therefore the Renderbuffer is not RGB Float/ RGB Half. So after bliting my renderbuffer to decode it back from RGBM to HDR RGB i can't use this HDR Texture in further image effects. Like when i use a image effect after the decode_from_rgbm the values are clamped between 0-1 and the high color range is gone, so no more beautiful bloom or eye adaption possible. I guess this has something to do with the OnRenderImage source beeing in a LDR Format.
    Anyone has an idea for a workaround or how to change my LDR Rendertexture after my first graphics.blit to a RGB Float texture to keep the high dynamic range?
    My Idea was maybe i can overwrite the following source-rendertextures with my own or something...
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,236
    OlliQueck likes this.
  3. OlliQueck

    OlliQueck

    Joined:
    Apr 11, 2013
    Posts:
    49
    uhm... nice, so HDR with MSAA basically is possible? that's a much better approach. Will try asap thank you very much :)