(Unity 6 Preview) Shader error in 'Shader Graphs/Master': 'SHADERGRAPH_BAKED_GI': Too few arguments to a macro call

Guys I don’t know if this is related to the editor, but I get this shader error when first opened the URP sample scene with the new editor.

This is the error:

Shader error in 'Shader Graphs/Master': 'SHADERGRAPH_BAKED_GI': Too few arguments to a macro call. at /(694)

Compiling Subshader: 0, Pass: Universal Forward, Vertex program with FOG_LINEAR
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DOTS_INSTANCING_ON FOG_EXP FOG_EXP2 INSTANCING_ON LIGHTMAP_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING USE_LEGACY_LIGHTMAPS _SAMPLE_GI



o

This is also occurring in a brand new/fresh URP project with Unity 2022.3.27. Same exact error.

7 Answers

7

I could actually fix it in the “ScreenLighting” shadersubgraph:

  1. Search the connection between “Baked GI” (Out 3) → “Multiply” (A3) and delete it.
  2. Hit save.
  3. Reconnect the node as it was before.
  4. Hit save.
    → The shader is displayed correctly in my scene.

hmm, show how we just need to disconnect the connection from Baked GI to the other, close the graph, open it again, and reconnect again :/ It doesn't log the error anymore when hit save.

I tried this sample project as well, and tried it on 2022.3.30f1 as it’s available, and i also had this problem upon loading in the project.
But after tinkering around, and trying to figure out how to fix it, i found the solution by going to the screen lighting node, and adding the object node to put it on to the Baked GI Node inside the screen lighting.
The node with problems above is the “Screen lighting” one inside the screen graph shadergraph, double click the node with a red exclamation mark.

image

The solution i found, though it’s unclear if it’s a sure fix it did fix it for me as the shaders didn’t dissappear like before.
Edit : haven’t found the fix for the others, but this one made the sample show the somewhat intended look.

I want to comment that this did fix the Unity 6 preview error as well. Not sure how this works, I have a LOT to learn about shaders still, but following this quick change worked great.

can you post a picture of whole graph, I'm in 2022.3.32f1 just downloaded and facing same issue. can not find this node in any graphs.

Here we are a couple of weeks later, and this is still not fixed? I just did a fresh install of 2022.3.28f1, set up a new project with Universal 3D Sample. Same errors appearing.

same issue u6 preview 0f1

Shader error in 'Shader Graphs/Screen_Graph': 'SHADERGRAPH_BAKED_GI': Too few arguments to a macro call. at Assets/Scenes/Terminal/Shaders/Screen_Graph.shadergraph(680)

Compiling Subshader: 0, Pass: Universal Forward, Vertex program with DIRLIGHTMAP_COMBINED FOG_LINEAR LIGHTMAP_ON _FORWARD_PLUS _REFLECTION_PROBE_BOX_PROJECTION
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DOTS_INSTANCING_ON FOG_EXP FOG_EXP2 INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING USE_LEGACY_LIGHTMAPS _SAMPLE_GI

I’ve fixed this by right-clicking on the Screen_Graph shader graph and selecting Reimport.

This can work if the node graph has the baked GI node already added. Odd issue.

Anyone filed a bug report on this yet? Seems the node got broken somehow.

i dont think there is a Baked GI node