Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Applying a Shader Effect in Canvas to RGB and Semantic Segmentation images

Discussion in 'Computer Vision' started by lyndonchanavidbots, Jun 15, 2022.

  1. lyndonchanavidbots

    lyndonchanavidbots

    Joined:
    Dec 13, 2021
    Posts:
    3
    I am currently rendering a 360-degree equirectangular view from the camera by following this repo, which renders from a camera to a cubemap texture, then applies a distortion shader to remap the texture image to 360-degree equirectangular format within a material, and finally renders the texture to the screen (and replaces the camera on display) using a canvas.



    However, when I apply a Perception Camera to get the annotations like usual, I get a flipped and rotated smaller-FOV view of the scene saved instead (with the RGB looking to the right and the segmentation looking forward):

    upload_2022-6-15_17-41-27.png
    upload_2022-6-15_17-41-33.png

    I got lens distortion using the post-processing volume working on both RGB and semantic segmentation images before so I tried swapping the LensDistortion.shader with my own (by changing the value of
    k_ShaderName
    inside
    LensDistortionCrossPipelinePass.cs
    ) but it appears that Unity is still using the original
    LensDistortion.shader
    .

    Does anyone know how I could get this custom effect working with Unity Perception?

    Many thanks!
     

    Attached Files: