Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

LWRP, Render Pass Blit and VR

Discussion in 'Universal Render Pipeline' started by Tsequier, Nov 11, 2019.

  1. Tsequier

    Tsequier

    Joined:
    Apr 20, 2016
    Posts:
    23
    Hello,
    I've come across these videos ( this one and this one) on youtube about custom renderer for LWRP, with "Blit" and "Render Object", and I wanted to try it in my VR Project.
    However, the rendering is messed up: it renders 2 eyes in each eye...
    I am linking the 2 scripts + the SobelFilter shader that I am using, which come from the second linked video above, and I have no idea where the issue might come from (probably the Blit, but my knowledge is limited).
    Could you please help me pinpoint the problem?
    Thanks !
     

    Attached Files:

  2. firsttype5

    firsttype5

    Joined:
    Oct 9, 2019
    Posts:
    4
    Last edited: Nov 14, 2019
  3. Tsequier

    Tsequier

    Joined:
    Apr 20, 2016
    Posts:
    23
  4. morenogarciaalejandro07

    morenogarciaalejandro07

    Joined:
    Jan 2, 2020
    Posts:
    1
    Tsequier podrias mostrar un ejemplo mas claro tambien estoy con ese problema y aun no entiendo
     
  5. Tsequier

    Tsequier

    Joined:
    Apr 20, 2016
    Posts:
    23
    @morenogarciaalejandro07 Here is the correction of the SobelShader that I linked in the original post using UnityStereoScreenSpaceUVAdjust, I think every modification happen in the frag{ }

    Hope it helps!
     

    Attached Files:

    Wambosa and PNiermann like this.
  6. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Ah we can update the shader to proper support XR. If anyone is curious URP declares UnityStereoTransformScreenSpaceTex function which is the same as UnityStereoScreenSpaceUVAdjust
     
    chrismarch likes this.
  7. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    470
    I'm spending a chunk of time tracking down these new function names to update old shaders. I wish I had found this doc page sooner:
    https://teofilobd.github.io/unity/shaders/urp/graphics/2020/05/18/From-Built-in-to-URP.html

    Also, I've found two files that define general purpose shader functions with new names, which I am using as my reference:

    https://github.com/Unity-Technologi...l/ShaderLibrary/ShaderVariablesFunctions.hlsl

    https://github.com/Unity-Technologi...lines.core/ShaderLibrary/SpaceTransforms.hlsl
     
    Last edited: May 29, 2020
  8. Wambosa

    Wambosa

    Joined:
    Jun 2, 2013
    Posts:
    12
    nooooo!
    @chrismarch the link is down sadly.
    Thank you anyways for sharing
     
    chrismarch likes this.
  9. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    470