Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors and pink shader on Water material #1

Open
MlleDR opened this issue Aug 19, 2019 · 3 comments
Open

Errors and pink shader on Water material #1

MlleDR opened this issue Aug 19, 2019 · 3 comments

Comments

@MlleDR
Copy link

MlleDR commented Aug 19, 2019

Hello,

I just wanted to report this bug. I downloaded the project and while opening the main scene, I saw that the Water shader has errors and is pink in the scene.

image

image

Error 1

UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:311)
UnityEngine.GUILayout.BeginScrollView (UnityEngine.Vector2 scrollPosition, System.Boolean alwaysShowHorizontal, System.Boolean alwaysShowVertical, UnityEngine.GUIStyle horizontalScrollbar, UnityEngine.GUIStyle verticalScrollbar, UnityEngine.GUIStyle background, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:360)
UnityEngine.GUILayout.BeginScrollView (UnityEngine.Vector2 scrollPosition, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:349)
UnityEditor.ShaderInspector.ShaderErrorListUI (UnityEngine.Object shader, UnityEditor.ShaderMessage[] messages, UnityEngine.Vector2& scrollPosition) (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:181)
UnityEditor.ShaderInspector.ShowShaderErrors (UnityEngine.Shader s) (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:301)
UnityEditor.ShaderInspector.ShowShaderCodeArea (UnityEngine.Shader s) (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:156)
UnityEditor.ShaderInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:85)
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:496)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error 2

Shader error in 'Shader Graphs/Water': syntax error: unexpected integer constant at line 90 (on d3d11)

Compiling Fragment program
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

Error 3

Compiling Fragment program
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

Error 4

Shader error in 'Shader Graphs/Water': syntax error: unexpected integer constant at line 759 (on d3d11)

Compiling Fragment program with UNITY_PASS_SHADOWCASTER
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

Error 5

Shader error in 'Shader Graphs/Water': incorrect number of arguments to numeric-type constructor at line 760 (on d3d11)

Compiling Fragment program with UNITY_PASS_SHADOWCASTER
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
@discostudio
Copy link

Yes, same here :(
Pink on water shader.
No news?

@M3talen
Copy link

M3talen commented Sep 27, 2019

Same here

@zORg-alex
Copy link

zORg-alex commented Apr 20, 2021

Got it working. I've peeked at https://blogs.unity3d.com/2021/02/05/introducing-shader-graphs-new-master-stack/
They used Unity 2020.2 and same function.
Remove
#ifndef CUSTOM_LIGHTING_INCLUDED #define CUSTOM_LIGHTING_INCLUDED
and #endif at the end.
and use
#ifdef SHADERGRAPH_PREVIEW
instead of
#if SHADERGRAPH_PREVIEW

No need to include anything. Just plain functions. Seems that it was removed for simplicity.
I tried this on 2020 LTS version. Works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants