Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Question Shader Error 'AdditionalLightShadow': no matching 4 parameter function

Discussion in '2021.1 Beta' started by Kryptaris, Jan 6, 2021.

  1. Kryptaris

    Kryptaris

    Joined:
    Dec 16, 2013
    Posts:
    2
    Good afternoon!

    I recently moved from 2020.2 to 2021.1 and have come across an error in one of my shaders with the new version with URP. It looks like a function I'd previously been calling 'AdditionalLightShadow' with 4 parameters is no longer valid. I have a copy of the project running in 2020.2 and the shader works correctly there, so it looks like that function perhaps changed. Is there a place I can view changes to this sort of thing or the list of built in functions so that I can make the appropriate changes?

    Thanks in advance for any pointers/help!
     
    leslviv likes this.
  2. leslviv

    leslviv

    Joined:
    Jun 22, 2019
    Posts:
    32
    I switched to 2021 and Vegetation shader from Unity Boat Attack project works, but I get errors when trying to edit

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.ShaderGraph.AbstractMaterialNode.CollectPreviewMaterialProperties (System.Collections.Generic.List`1[T] properties) (at C:/Users/leslv/Documents/Software/unity-editors/2021.1.0b1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs:713)
    UnityEditor.ShaderGraph.Drawing.PreviewManager.CollectPreviewProperties (System.Collections.Generic.IEnumerable`1[T] nodesToCollect, UnityEditor.ShaderGraph.PooledList`1[T] perMaterialPreviewProperties) (at C:/Users/leslv/Documents/Software/unity-editors/2021.1.0b1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.shadergraph/Editor/Drawing/PreviewManager.cs:355)
    UnityEditor.ShaderGraph.Drawing.PreviewManager.RenderPreviews (System.Boolean requestShaders) (at C:/Users/leslv/Documents/Software/unity-editors/2021.1.0b1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.shadergraph/Editor/Drawing/PreviewManager.cs:442)
    UnityEditor.ShaderGraph.Drawing.GraphEditorView.HandleGraphChanges (System.Boolean wasUndoRedoPerformed) (at C:/Users/leslv/Documents/Software/unity-editors/2021.1.0b1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs:659)
     
  3. Kryptaris

    Kryptaris

    Joined:
    Dec 16, 2013
    Posts:
    2