Search Unity

LWRP still stacking the cameras?

Discussion in 'Universal Render Pipeline' started by calpolican, Jan 23, 2020.

  1. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    Hi, I used to have 2 cameras stacked to render a model over the UI, but after switching to the LWRP I noticed stacking was not allowed, so I started using a render texture instead.
    Now everything works great in the editor, but when I build I see the model beign render as if it's camera had a "don't clear flag".
    How to solve?
    problemas de la build.jpg
     
  2. erikabar

    erikabar

    Unity Technologies

    Joined:
    Jan 26, 2017
    Posts:
    36
    Hey! Camera stacking is indeed not supported in LWRP, but it will be available in Universal RP package very soon - in 7.2 package.
    As for Render Texture issue - what LWRP version do you use?
     
    phil_lira likes this.
  3. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    Unity version : 2019.2.15f1 (I think is the last stable version)
    LWRP version: 6.9.2 (says it's up to date)

    I have 2 cameras in the scene, one is the main one, the other is the camera that renders the mesh to a texture. The background option of the camera that renders to texture is set to "Don't care".
     
  4. DanielThomas

    DanielThomas

    Joined:
    Mar 30, 2013
    Posts:
    110
    Try setting clearflag to a color and with full transparency.
     
  5. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    The result is the same unfortunately.
    I'm kind of wondering what's really happening. I mean, it seems that the camera is beign stacked anyway, just like it was previously, but it doesn't clear the buffer, wich makes it useless. I guess I can look at how to make another render pass.
    But it would mean that the render texture is no longer a viable option altogether.
    I hate it when the resut in the editor doesn't much the build because it makes it so diffcult to debug. You have to be constantly re building to see if a solution worked.
     
  6. dralois

    dralois

    Joined:
    Nov 27, 2018
    Posts:
    2
    I use render textures in combination with a few shaders and a render pass to do something like you seem to be doing and it works fine. How do you display the render texture, with a shader or in gui?
     
  7. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    I use a RawImage (GUI), in a canvas.