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

Have UWP, URP & Unlit shaders stopped playing together?

Discussion in 'Windows' started by kingbreedicus, May 4, 2020.

  1. kingbreedicus

    kingbreedicus

    Joined:
    May 16, 2013
    Posts:
    14
    I'm finding a strange thing in my Unity UWP build.I am using Unity 2019.3.12f1, with the Universal Render Pipeline I have a simple model, it has one material, that material has an unlit shader, with an exposed RGBA value.
    Everything is fine in the editor, but when I build for the Xbox this shader causes all geometry except the 2D Canvas/HUD elements to stop rendering.
    So you see HUD elements and hear the sounds etc but no MainCamera geometry gets rendered, its just black. It seems like quite a fundamental thing so someone must have a clue?
     
  2. kingbreedicus

    kingbreedicus

    Joined:
    May 16, 2013
    Posts:
    14
    OK, I think this is a DX12 problem. Building with just the old DX11 and everything works for me.
    If its not too much of a step back maybe you guys should try that?
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    Can you report a bug?
     
  4. pidgi2001

    pidgi2001

    Joined:
    Oct 12, 2019
    Posts:
    11
    Had same problem, with a few differences. Maybe my solution could help someone. Game written for the Quest. Editor 2021.3.30f1. Project worked fine, until migration to URP (water shader needed, that's why I did the migration).
    Screen totaly black on Game view and also on my Quest after APK installed.
    Using Oculus Integration. My player had the main camera (CenterEyeAnchor), and I did attach a second camera as a child of that one, with the culling mask set at UI only.
    Solution (after a lot of tries, failures, reconversion, etc.):
    I clicked that second cam (UI one), changed 'Render Type' (Inspector window, Camera component) from 'Base' to 'Overlay'. Then clicked on main Camera, verified that Render Type is 'Base', and added the second cam on the 'Stack' paragraph of the Camera Component.
    Now, it works perfectly.