- Home /
ShaderGraph always results in pink (broken) shader
Hi guys. Just downloaded the latest version of Unity and the Shader Graph is totally broken. No matter what I do, even if I leave everything to the default, it just results in a pink (broken) shader.
Answer by Remy_Unity · May 04, 2018 at 04:28 PM
Are you using the LightWeight Render Pipeline too ?
Shadergraph is ment to work only with this for the moment. It is stated in this blog post : https://blogs.unity3d.com/2018/02/27/introduction-to-shader-graph-build-your-shaders-with-a-visual-editor/
Shader Graph is designed to work with another Unity 2018.1 feature: Scriptable Render Pipeline (SRP). Therefore, you can’t use it with the Built-In Unity Renderer. It will come with support for:
- The High-Definition Render Pipeline
- The Lightweight Render Pipeline.
I've installed the render-pipelines.core, render-pipelines.lightweight and ShaderGraph packages. Do I need to tell the editor to use the new render pipeline, and where I can do that?
Ok, I found it. I had to create LightweightPipelineAsset and link it in the Graphics settings. Thank you very much mate, you actually helped me :)
Everything else in my scene turned pink when I did that. :)
Answer by dustin_pau1 · Jun 03, 2018 at 01:43 AM
For any others, youll need to make sure you have the Lightweight render pipeline package installed. You can check by going to Window>PackageManager. If you dont already have it installed, you can install it in the "All" tab. Next, create a new LightweightAsset in the asset folder by Create>Rendering>LightweightAsset. Then go to Edit>ProjectSettings>GraphicsSettings and place that LightweightAsset in the Scriptable Render Pipeline Settings. After that I closed and re-opened the Shader Graph editor window and it was solved.
I needed both of your answer. Works like a charm now!
Thanks
after i did this, it worked for the shader graph, but every other texture is now that pink color!?!? Unity version: 2018.1.4f1
here are my packages: I added the hd render pipeline hoping that would fix it
Try changing the shader to the Standard shader on the pink objects and only use the lightweight shader for objects shaded with the shader graph.
$$anonymous$$aybe it is because those materials are not using Shader Graph. If that is the case you have two options.
1) Choose a material and change the shader for "LightweightPipeline/Standard (Physically Based)".
2) Go to Edit>Render Pipeline>Upgrade Project $$anonymous$$aterials to LightWeight $$anonymous$$aterials.
That works for me.
SOLUTION 1 example SOLUTION 2 example
Some of the materials need the fast leaves shader in nature, same with other materials. But the main materials that just go directly on an object do work properly when i change them to what you said
Thank you for your help i have been looking for a fix for hours :)
Answer by Xerges · Jul 17, 2018 at 08:37 PM
is there any chance to use Shadergraph in a regular 3D project? ? please...
This is not planned and Shadergraph will support the new render pipelines. If you need a nodal shader editor for the Built-In pipeline, you can either use solutions in the asset store (Amplify Shader Editor for example), or if your confident enough, write your own ShaderGraph master node that outputs compatible shader for Built-In.
Then there shouldn't be an option to create a project with the old regular 3D. Unity should now on only give you the option of LW SRP or HD SRP, but don't keep the old 3D without SRP if it's not going to be incompatible with all the tools, it's a bad design choice.
Answer by Nazarovas · Sep 25, 2018 at 02:58 AM
when starting a new project select Lightweight RP template, in project there are an example assets, do not delete the settings folder and it worked for me even with the 2018.2 ver. hope this works for you to...
Answer by kayb14 · Oct 13, 2018 at 03:10 AM
I have a totally diffrent solution for this, that works perfect for me. Unity could allready reproduce this bug and claim they fixed it but they didn't. Obviously.
Causing this problem, in my case, is any exposed property that is not set to 0. Doesn`t matter if color, floats, ints, sliders, vectors, textures anything that is not the predefined default setting will cause compile errors, if the property is eposed.
So I am now developing my shader without any exposed properties, and set it all back to zero, before exposing them. This is a shame, becuase one can't have any default values, that are logical to the shader.
anyway hope this helps!