Search Unity

Shader Graph Preview always blank

Discussion in 'Getting Started' started by JapaneseBreakfast, Nov 3, 2018.

  1. JapaneseBreakfast

    JapaneseBreakfast

    Joined:
    Sep 7, 2018
    Posts:
    44
    Every time I create a new PBR Graph, I never see anything on the preview:



    - I've saved the shader and re-opened.
    - I've added the lightweight renderer with the Package Manager
    - I've added a Lightweight Pipeline Asset to the Scriptable Render Pipeline Settings in the graphics settings.
    - I see nothing in the preview, but the shader works.

    Strangely enough, if I add any other graph I can see a circle. The PBR graph never work though. Anybody have any ideas what I'm doing wrong?

    Unity: 2018.2.14f1 Personal (64bit)
    OS: MacOS High Sierra Version 10.13.6
    Graphics: Radeon Pro 450 2048 MB
     
    Last edited: Nov 3, 2018
  2. Daniel_unity201

    Daniel_unity201

    Joined:
    Sep 15, 2018
    Posts:
    1
    Similar Issue hier - any fixes?
     
  3. Console errors?

    Also please report the bug with the bug report function.
     
  4. JapaneseBreakfast

    JapaneseBreakfast

    Joined:
    Sep 7, 2018
    Posts:
    44
    I just checked and I get a lot of these warnings:

    Code (CSharp):
    1. Metal: Fragment shader missing buffer binding at index 4 (_LightIndexBuffer / PBR Master)
    2. Metal: Fragment shader missing buffer binding at index 2 (_LightIndexBuffer / Sphere)
    3. Metal: Fragment shader missing buffer binding at index 3 (_LightIndexBuffer / LightweightPipeline/Standard (Physically Based))
    Every time I close the Shader Graph and re-open, I get 4 of the same warnings:

    Code (CSharp):
    1. Metal: Fragment shader missing buffer binding at index 4 (_LightIndexBuffer / PBR Master)
    Just in case, you can find the project here.

    I also get these images in the preview, if I resize the window, the preview goes blank.





     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
  6. JapaneseBreakfast

    JapaneseBreakfast

    Joined:
    Sep 7, 2018
    Posts:
    44
    Thanks for sharing Ryiah. Can't do much about it, Unity is still working on it so it's completely understandable. Can't wait to use it the Shader Graph though, seems awesome :(
     
  7. dr4

    dr4

    Joined:
    Jan 14, 2015
    Posts:
    108
    I know this post is old but it is the first result in google,I still have the same problem in anything superior to the version 2018.2.18, there I can work with the HDR normally but as soon as I try to do the same in superior versions my PBR Master is completely blank, no errors and it seems to work fine, I just don't have any preview at all which make work with shaders very hard as I need to see the effect in the scene

    upload_2019-4-28_23-17-16.png
     
  8. Soulstus

    Soulstus

    Joined:
    Apr 2, 2019
    Posts:
    1
    I am having the same issue in version 2019.1.1f1 everything is up to date and current in regards to packages.
     
  9. Sun-Dog

    Sun-Dog

    Joined:
    Mar 23, 2009
    Posts:
    144
    I've made 3 shaders using shader graph, and #4 is ... blank. No clue why.
     
    robotnicc likes this.
  10. tsangwailam

    tsangwailam

    Joined:
    Jul 30, 2013
    Posts:
    280
    My properties panel and preview also blank. running newest version 2019. Any clue?
     
  11. Gornian

    Gornian

    Joined:
    Jun 22, 2017
    Posts:
    7
    I have the same.
     
  12. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    229
    This problem still persists...

    Unity 2019.1.5f
    HDRP 5.16.1
    VFX Graph 5.13.0
    macOS 10.13.6
     
  13. BenDover880

    BenDover880

    Joined:
    Feb 22, 2017
    Posts:
    1
    Not a fix but could be useful, try using another type of graph. For me the preview is only broken in PBR Graphs.
     
  14. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    229
    Me too, but I need PBR's Alpha Cutout
     
  15. cdrbehze

    cdrbehze

    Joined:
    Jun 12, 2019
    Posts:
    1
    Try updating unity to the earliest version, worked for me
     
  16. Javelin_IA

    Javelin_IA

    Joined:
    Feb 17, 2015
    Posts:
    3
    Hi,
    i had an empty Main Preview today, but i just selected another preview object and got it to work. I Foun out that the plane i used before was shown from the bottom side where its transparent --> Main Preview seems to be empty...
     
  17. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    I believe the problem is you're using the "normal" PBR Graph, you need to go into HDRP -> Blah Graph.
    I think it's for the LWRP maybe.
     
    Rebuskater and gooodpgr like this.
  18. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    The problem came for me in LWRP when I started using a Custom Forward Renderer and then it broke. Making a new Custom Forward Renderer with default settings fixes it.
    So if you are working on Shaders you need to toggle between your Pipeline renderer using your game custom forward renderer and a default one.
     
  19. Gornian

    Gornian

    Joined:
    Jun 22, 2017
    Posts:
    7
    Unity, Are you kidding? Still not working!!!
    Unity version 2019.1.9 ! LWRP.
    Total blank properties and preview! When will be fix for this? From November previous year!
    OS: MacOS High Sierra Version 10.13.6
     
  20. Skyler_Hawkins

    Skyler_Hawkins

    Joined:
    Aug 18, 2016
    Posts:
    32
    This fixed it for me. I switched over to HDRP for my current project and noticed when I would use PBR Graph nothing would should up like it would with LWRP. I went to HDRP instead and chose one from there and now the Main Preview is working like it's suppose to.

    So, PBR Shader for LWRP and HDRP for HDRP and everything works fine.
     
  21. unity_XY9s7LplAiQxIQ

    unity_XY9s7LplAiQxIQ

    Joined:
    Jul 7, 2018
    Posts:
    1
    I had a same problem . the solution is using hdrp lit Graph instead of PBR which is for LWRP.
     
  22. PadenLee

    PadenLee

    Joined:
    Dec 8, 2012
    Posts:
    4
    I fixed the issue preview being blank by creating a material in the project with the new shader graph assigned to it and reopened the shader and the preview worked
     
  23. Skyler_Hawkins

    Skyler_Hawkins

    Joined:
    Aug 18, 2016
    Posts:
    32
    For some reason now, I can't get any of the preview to move... The preview are static which makes it so hard to see changes unless you save and go into your project.
     
  24. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I think this will be fixed in next build. For me time node doesn't work in the editor preview with 6.9.1.
    Maybe this is connected.
     
  25. deniel777

    deniel777

    Joined:
    Jul 15, 2018
    Posts:
    1
    This solved for me the problem: Edit-->Render Pipeline-->Upgrade Project Materials to Hight Definition Materials
     
  26. akthiele

    akthiele

    Joined:
    May 15, 2017
    Posts:
    2
    hm, i can not get it to work unless i choose one of the HDRP shaders, not the PBR...

    ps. i am using 2019.2.12f1 so i would have thought that it is fixed by now? maybe i am missing something..,
     
  27. theBeckX

    theBeckX

    Joined:
    Apr 13, 2020
    Posts:
    1
    I had the same problem and fixed it by adding default textures.
    using URP with the 2D Renderer.
    feels like an easy thing to overlook, and maybe this fixes it for some
     
    Rany_AN likes this.
  28. Wambosa

    Wambosa

    Joined:
    Jun 2, 2013
    Posts:
    12
    I have found a way to reproduce and work around it!
    unity-bug-1.gif
    1. Collapse the little preview window (this breaks the preview)
    2. group the node (somehow triggers a redraw - fixing the blank)

    edit: ctrl+g, then ctrl+z is much faster, and does the same thing forcing a redraw
     
  29. Kitsune_bcn

    Kitsune_bcn

    Joined:
    Jul 1, 2021
    Posts:
    16
    2021.2.0.b11 and the problem still persists...have tried to group and ungroup but it doesn't refresh.

     
  30. HofiOne

    HofiOne

    Joined:
    Apr 19, 2021
    Posts:
    68
    2021.1.28f1 + URP + macOS 11.6.1
    same issue even for a newly created default Lit Shader
     

    Attached Files:

    mehmet_soyturk likes this.
  31. bobby55

    bobby55

    Joined:
    Jun 24, 2020
    Posts:
    48
    Hi i'm not sure if this is the correct answer but for my case i changed the universal material to sprite lit
    upload_2022-7-29_12-25-45.png
     
    mannyfresh2k4 and Airingdom like this.
  32. TheGreenEmerald

    TheGreenEmerald

    Joined:
    Aug 2, 2021
    Posts:
    1
    Did you try double clicking choosing a mesh / or custom mesh? Screen Shot 2022-08-05 at 9.46.42 PM.png
     
  33. Irrgeist

    Irrgeist

    Joined:
    Jul 9, 2015
    Posts:
    28
    Same Issue with latest 2021 LTS and 2022.2 Beta. Sprite Lit shows up, but nothing else. I am trying to generate a decal shader though
     
    mehmet_soyturk likes this.
  34. ChocoDarkStudio

    ChocoDarkStudio

    Joined:
    May 22, 2020
    Posts:
    2

    I solved this by following the steps below:
    1) Open the shadergraph that doesn't show the preview.
    2) Click "Save As", select a folder and save a copy of this shader.
    3) After that it will automatically open the saved shader, the preview shows a weird texture.
    4) Immediately you have to change the preview mesh to another. like a cube or a sphere.
    5) Now you can go back to the original shader :). (you can delete the copy)

    Unity: 2021.3.6f1 Personal (64bit) <DX11>
    OS: Windows 10
     
    hbguler likes this.
  35. hbguler

    hbguler

    Joined:
    May 16, 2017
    Posts:
    8
    Thank you, can confirm it worked on version 2021.3.22f1.
     
    ChocoDarkStudio likes this.
  36. dev_vaib

    dev_vaib

    Joined:
    Mar 6, 2023
    Posts:
    1
    Upgrade to 2022.3.3f1 (LTS) issue has been resolved.
     
  37. BACALL

    BACALL

    Joined:
    Feb 21, 2017
    Posts:
    87
    The issue is back on 2023 (tested 2023.1.9 and 2023.1.12), macOS M1. Using URP 2D, Sprite Lit
     
  38. amp206

    amp206

    Joined:
    Apr 11, 2017
    Posts:
    1
    The issue could be related to the material used by the preview. Somehow mine got linked to a material in my Assets folder (a plain color material). When I updated the color in that material, the Shader Graph preview was showing that color instead of the actual shader being edited.

    I deleted that material and then the preview shows nothing at all.

    Tested in 2022.3.12f1 using URP 2D
    upload_2023-11-2_9-7-46.png