Search Unity

URP - Point Cloud moves with canvas - VR URP/Shader Problem

Discussion in 'Universal Render Pipeline' started by Rickmc3280, Nov 8, 2021.

  1. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    I am using Point Cloud Tools from the Asset store and using the part that is uploaded to a compute buffer and utilized in the OnRenderObject function. (The developers programming at this point).

    When I look at a plane or a canvas (specifically happens 100% of the time with canvas), the point cloud seems to attach to the Canvas element. I played with some debugging and saw that there were some issues with the cameras that when you try to get Current Camera, it is always null for the VR camera and you cant get the eye which may cause issues in the shader, but works for the Scene Camera.

    I have used 2019,2020,2021 and 2022 all reproduce this issue when using URP and HDRP. Problem does NOT exist when using standard pipeline.

    Another Partial fix ( but still has many problems) is if I use camera stack and have one camera that has NO culling. I can use it to render the point cloud, then another to render everything else. However, once again, sometimes if I look at a plane or canvas it will create either another point cloud OR render it on a canvas/plane. If I move the canvas/plane in world space it moves with it until it goes out of scene, in such case the point cloud moves back to its original position.

    What would cause this issue in URP, is it the missing XR Camera data, or shader issues with URP/XR?

    Any chance Unity can release a shader for handling points ( XYZ, RGB (color data?) - float,float,float,byte,byte,byte). I've followed the docs regarding singlepass stereo but still have this issue no matter what I try.

    I have used URP Mesh version, but the quantity of points causes issues and runs much better with the buffers (DrawProcedural) method.