Closed ghost closed 4 years ago
@JockTokk Unity shadergraph is still has some bugs. Navigate to the shader and double click it. This will open shadergraph editor. In the top left, click Save Asset... This will recompile the shader. Let me know if this fixes the issue.
@EricBoiseLGSVL, thank you! I will try it and I will report the result.
@EricBoiseLGSVL, unfortunatelly, there are new errors.
@JockTokk Ok, in project root, while Unity is closed, delete Library folder. Then open Unity and it will rebuild this folder. Let me know if this fixes the issues
@EricBoiseLGSVL, I've done this instruction, but it hasn't helped.
This is much better. Can you open a environment and see if the shader compiled? Also, are you on Linux with vulkan or windows?
@EricBoiseLGSVL , I'am on Windows. Unfortunatelly, all is the same
@JockTokk This seems like code in the shader is not supported by your GPU or driver issues. What GPU are you using and what driver version are you on?
This would be really strange if this would be GPU driver issue. My guess is on Unity messing up generated shader graph code.
@JockTokk Can you do following, please?
1) Double click EnvironmentSimulation shader (or click Open Shader Editor
button from your last screenshot)
2) On the rightmost node called Lit Master
click right mouse button and select Show Generated Code
3) Now scroll to line 1937 or 4839 or 7359 and copy & paste it here (maybe one extra line above and below too)
It could be this bug: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/5424 If locale settings are messing up float conversion and instead 1.0 you get 1,0 - that's a syntax error. @JockTokk what system locale you have? Do you use , (comma) or . (dot) for decimal point? Can you try changing that to . (dot) in your system locale settings? When you change it, restart Unity to see if this gets fixed.
@EricBoiseLGSVL, NVIDIA GeForce GT 720M. Driver version: 391.35.
@martins-mozeiko thanks, yes this has been an issue before. @JockTokk Is your GPU 2gb? If so, you will have many issues running simulator. We recommend at least 8gb.
@martins-mozeiko, you are right. It's related with system locale.
Line number 9759:
Gradient _Gradient_AFE042FB_Out_0 = NewGradient(0, 5, 2, float4(0, 0, 0, 0,08529793),float4(0,8490566, 0,8490566, 0,8490566, 0,6470588),float4(1, 1, 1, 0,7617609),float4(0,1037736, 0,1027946, 0,1027946, 0,9264668),float4(0, 0, 0, 1),float4(0, 0, 0, 0),float4(0, 0, 0, 0),float4(0, 0, 0, 0), float2(1, 0),float2(1, 1),float2(0, 0),float2(0, 0),float2(0, 0),float2(0, 0),float2(0, 0),float2(0, 0));
I changed the comma to the dot in the system, but it hasn't helped. I've tried to remove folder Library in project root. It also hasn't helped.
@EricBoiseLGSVL, yes. It's just test.
You changed it here? To dot?
And then closed Unity fully, including Unity Hub, and then reopened project again?
You don't need to delete Library folder. Just right click on EnvironmentSimulation shader and choose Reimport.
You changed it here? To dot?'
@martins-mozeiko, yes.
And then closed Unity fully, including Unity Hub, and then reopened project again?
Yes.
Maybe try logging out from your user and logging back on Windows. I don't remember how regional settings were applied in Windows.
@martins-mozeiko I've already tried that. I've also tried to reboot system.
Alternative would be to open GradientShaderProperty.cs
file and apply these changes manually: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/5424/files#diff-c233a20539fb47175c19f9a89d09837c
This file is inside Library/PackageCache/com.unity.shadergraph@5.16.1/Editor/Data/Graphs
folder.
Note that changes will disappear, if Library folder gets removed.
After that try reimporting the shader again.
@martins-mozeiko I've just reinstalled project. Errors have disappeared. But...
In play mode
@JockTokk Yes, in editor there is no light source. In play mode we add the directional light. To have lighting in scene view press the button top left of scene view panel.
@EricBoiseLGSVL yes exactly.
@EricBoiseLGSVL @martins-mozeiko thank you very much for the help!
For anyone, who will face this problem.
Reboot your computer.
In project right click on EnvironmentSimulation shader and choose Reimport. It's in Assets/Shaders/EnvironmentShaders
.
If it won't work, you need to again create new project.
If it won't work, you need to
Alternative would be to open
GradientShaderProperty.cs
file and apply these changes manually: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/5424/files#diff-c233a20539fb47175c19f9a89d09837cThis file is inside
Library/PackageCache/com.unity.shadergraph@5.16.1/Editor/Data/Graphs
folder. Note that changes will disappear, if Library folder gets removed.After that try reimporting the shader again.
Hi, LG Team, I have a problem with shader in SanFrancisco map. I've used
git lfs install
. (Windows 10)Shader error in 'Shader Graphs/EnvironmentSimulation': 'NewGradient': no matching 0 parameter function at line 1537 (on d3d11)
Compiling Vertex program with UNITY_PASS_META 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
Shader error in 'Shader Graphs/EnvironmentSimulation': syntax error: unexpected integer constant at line 1537 (on d3d11)
Compiling Vertex program with UNITY_PASS_META 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
Shader error in 'Shader Graphs/EnvironmentSimulation': 'NewGradient': no matching 0 parameter function at line 4839 (on d3d11)
Compiling Vertex 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
Shader error in 'Shader Graphs/EnvironmentSimulation': syntax error: unexpected integer constant at line 4839 (on d3d11)
Compiling Vertex 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
Shader error in 'Shader Graphs/EnvironmentSimulation': 'NewGradient': no matching 0 parameter function at line 7359 (on d3d11)
Compiling Fragment program with DECALS_3RT LIGHT_LAYERS 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
Shader error in 'Shader Graphs/EnvironmentSimulation': syntax error: unexpected integer constant at line 7359 (on d3d11)
Compiling Fragment program with DECALS_3RT LIGHT_LAYERS 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