Search Unity

Question How to sample a camera buffer in the VFX Graph ?

Discussion in 'Visual Effect Graph' started by barbelot, May 28, 2022.

  1. barbelot

    barbelot

    Joined:
    Jul 18, 2017
    Posts:
    38
    Hello,

    I am trying to sample a camera buffer in my VFX Graph to get the color value of the pixel at the particule position but all I get out of the Sample Camera Buffer node is black.

    My setup is the following in the graph :
    upload_2022-5-28_12-37-18.png

    with this binding on the object :
    upload_2022-5-28_12-38-47.png

    Am I missing something ?
    I checked the output of the world to viewport node and it seems to give correct UVs, but I don't get anything out of the sample camera buffer node.

    Thanks for any help.
     

    Attached Files:

  2. barbelot

    barbelot

    Joined:
    Jul 18, 2017
    Posts:
    38
    After more investigation, the viewport node is actually not giving correct UVs.

    However if I remove the MaskCamera property and enter the values of the camera manually in the World to Viewport Point node then it works. My guess is that the binding of the camera properties is not working properly, which would explain why the Sample Camera Buffer node output is all black if the buffer binding is also not done.

    I'm using Unity 2022.1.0f1, HDRP 13.1.8, Visual Effect Graph 13.1.8.