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.

Resolved post processing world position to screen overlay

Discussion in 'High Definition Render Pipeline' started by imtehQ, Jan 21, 2022.

  1. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    Hi, Im trying to create a effect that I dont know the name of, let me explane what im trying to get.

    A xyz location in world space, lets say (0,0,0) and with a radius (5) so you get like a shere in the scene. (Can be unlimited many points like that)
    Now i want the camera to show that sphere with a effect using post processing.
    If i do this with a shader / shader graph and a material on a sphere object in the scene im having the issue that the shere effect will stop working if i go inside the sphere range thats why im trying to use post processing.

    The effect im trying to create is that everything (thats not air) thats inside the sphere will go gray in color.
    But still keep the depth data, so i dont want the effect to be visable if its behind something.

    However after countless hours searching on google i can not find anything that works in the HDRP.
    Also I know only little about shader graph and barly anything of normal shaders, i just cant wrap my head around how that works,

    I can do c# and the way i see it working would be something like getting all the pixels off the screen and for each pixel get the world location so i get a array of vector3 points, then foreach point i just check if its within the sphere, if so change the pixel color to a grayish color and push back this image to the screen.

    How would you do something like that in HDRP post processing of render textures?
     
    Last edited: Jan 21, 2022
  2. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    Solved, i just found a asset that works for me.