Search Unity

World space post effect shaders (reconstruction of world position in image effect)

Discussion in 'Image Effects' started by hrgchris, Mar 20, 2018.

  1. hrgchris

    hrgchris

    Joined:
    Oct 26, 2016
    Posts:
    19
    Hey there

    Just thought I'd post this up here as I've seen it come up quite a few times. I've gathered together a load of good advice from various sources, modified it a bit and cleaned things up into a simple, hopefully conclusive example of how to reconstruct the world position of a pixel from within an image effect:

    https://github.com/chriscummings100/worldspaceposteffect

    I wrote it as I have a project that needs to support none-vr, single pass vr and multi pass vr on various platforms, and struggled to find 1-size-fits-all solution.

    Feel free to let me know if there's bugs, or suggest/supply fixes. I'd love to have one of these that just works!

    -Chris
     
  2. lgarczyn

    lgarczyn

    Joined:
    Nov 23, 2014
    Posts:
    68
    Old post, but thank you so much, this was exactly what I was looking for.
     
    briandemandiealleskan likes this.
  3. briandemandiealleskan

    briandemandiealleskan

    Joined:
    Apr 19, 2021
    Posts:
    3
  4. lgarczyn

    lgarczyn

    Joined:
    Nov 23, 2014
    Posts:
    68
    This works unchanged in the new unity full screen pass render feature, pretty cool