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

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,329
    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 :)