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

Question Rendering to a UAV target

Discussion in 'Shaders' started by VictorKs, Feb 14, 2023.

  1. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Fragment shaders support rendering to Unordered Access Textures/Buffers do games take advantage of that or mainly use them for Compute Shaders?

    What I am thinking of is Order Independent Transparency, can games implement it efficiently?
    Also I am trying to emulate the effects of CSAA, my idea is rendering without a render target only with one Unordered Access Texture2D bound as output and with forcedSampleCount to take multiple samples, blend them in fragment shaders and output a single color.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    The big thing you get from CSAA is the additional subsample positions. You can't really emulate that in any kind of performant way. And while CSAA w/ stochastic transparency can get you a decent approximation of OIT, once you're to looking at manually writing to a texture, you may want to look into per pixel linked lists instead, which gives you true OIT.
     
    VictorKs likes this.
  3. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    You are right it is no longer supported by modern hardware. Since I'm fairly new to graphics programing APIs many old/obsolete methods look like very great ideas to me. But I now realize that TAA techniques and DSR are the modern standard. I mean I'm still studying DX11 and it looks cutting edge tech for my knowledge, but I am certain I will reconsider once I get into DX12. I've been studying the development of graphics and Nvidia GPUs from the 90's till today and tbh I get excited over old tech like Tesla microarchitecture! But other times all this knowledge is too overwhelming and I end up reinventing the wheel while the rest are using their cars :D