Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by unity_M2wohqTrVDD0hw · Apr 20 at 09:18 AM · errorshaderrenderingshaders

ShaderGraph Error "undeclared identifier BuildSurfaceDescriptionInputs / BuildVertexDescriptionInputs"

I have created a project in Unity 2020.3.33f1 from the Universal RP Sample on my Linux machine, I am using Git (with LFS and all the correct settings according to https://thoughtbot.com/blog/how-to-git-with-unity) and now I cloned the project on my Windows 10 machine. When I now open the project, some materials that I created with a custom ShaderGraph are pink, when I open the Shadergraph I am presented with the following error on some (not all) nodes:

Shader error in 'Master': undeclared identifier 'BuildVertexDescriptionInputs' at /Library/PackageCache/com.unity.render-pipelines.universal@10.8.1/Editor/ShaderGraph/Includes/Varyings.hlsl(15) (on d3d11)

and

Shader error in 'hidden/preview/FresnelEffect_2582522f28e24c3798bc9a783b58d96d': undeclared identifier 'BuildSurfaceDescriptionInputs' at /Library/PackageCache/com.unity.shadergraph@10.8.1/ShaderGraphLibrary/PreviewPass.hlsl(13) (on d3d11)

Fresnel Effect is one of the affected nodes, as well as everything that uses it's output. Curiously, the generated code from the fresnel effect contains the following comment:

     //     $features.graphPixel:   $include("BuildSurfaceDescriptionInputs.template.hlsl")
     //                                       ^ ERROR: $include cannot find file : BuildSurfaceDescriptionInputs.template.hlsl. Looked into:
     // Packages/com.unity.shadergraph/Editor/Generation/Templates

List of things I have already tried: - Installing a different LTS version (no difference) - Restarting unity (no difference) - Making a new URP pipeline asset and assigning it in project settings - Creating a new URP sample project and copying in the shader (the shader works fine) Also, the PackageCache and Packages folder seem to be completely identical to a new URP project, while the ScriptAssemblies seem to differ.

I would gladly appreciate any help, as I am running out of possible fixes. Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by unity_M2wohqTrVDD0hw · Apr 20 at 12:56 PM

I was very surprised to find out, that moving my project to a different folder fixed the issue. I am not entirely sure, but I suspect that ShaderGraph cannot compile if the path to the project is too long, because I did have a rather long path, and now that it is shorter, the error does not appear anymore.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

269 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Scene Color Node in Shader Graph not working with Unity's 2D Renderer and URP 5 Answers

Distortion Shader does not render transparent objects (Shader Graph) 2 Answers

Shader error: incorrect number of arguments to numeric-type constructor 2 Answers

Fake Volumetrics via custom bloom 0 Answers

URP Blit Render Feature not rendering in Single Pass Instanced VR 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges