Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi7Fluid_beta Shader errors on build
#1
Hi,

After successfully installing Obi7Fluid_beta with a few small code modification you explained here, I add xr related plugin to the project, replace the main camera to OVR camera rig and tried to build it for the meta quest, then I received two shader errors in the log. They are two but seems the same error so maybe I can assume I got one error. The message is as below:

Code:
Shader error in 'Shader Graphs/IndirectTransparent': invalid subscript 'shadowCoord' at /UnityProjects/URP_Obi7/Library/PackageCache/com.unity.shadergraph@14.0.9/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/Varyings.hlsl(132) (on vulkan)

Compiling Subshader: 1, Pass: Pass, Vertex program with DIRECTIONAL LIGHTPROBE_SH STEREO_MULTIVIEW_ON _MAIN_LIGHT_SHADOWS
Platform defines: SHADER_API_MOBILE UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_FORWARDBASE UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SCREEN SHADOWS_SHADOWMASK UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING VERTEXLIGHT_ON _MAIN_LIGHT_SHADOWS_CASCADE _SHADOWS_SOFT


How can I fix this?
Unity 2022.3.13f1 (Android/URP/Vulkan) 
Universal RP 14.0.9 
Burst 1.8.9 
Collections 2.1.4 
Mathematics 1.2.6

   
Reply
#2
(30-11-2023, 04:53 AM)Snail921 Wrote: Hi,

After successfully installing Obi7Fluid_beta with a few small code modification you explained here, I add xr related plugin to the project, replace the main camera to OVR camera rig and tried to build it for the meta quest, then I received two shader errors in the log. They are two but seems the same error so maybe I can assume I got one error. The message is as below:

Code:
Shader error in 'Shader Graphs/IndirectTransparent': invalid subscript 'shadowCoord' at /UnityProjects/URP_Obi7/Library/PackageCache/com.unity.shadergraph@14.0.9/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/Varyings.hlsl(132) (on vulkan)

Compiling Subshader: 1, Pass: Pass, Vertex program with DIRECTIONAL LIGHTPROBE_SH STEREO_MULTIVIEW_ON _MAIN_LIGHT_SHADOWS
Platform defines: SHADER_API_MOBILE UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_FORWARDBASE UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SCREEN SHADOWS_SHADOWMASK UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING VERTEXLIGHT_ON _MAIN_LIGHT_SHADOWS_CASCADE _SHADOWS_SOFT


How can I fix this?
Unity 2022.3.13f1 (Android/URP/Vulkan) 
Universal RP 14.0.9 
Burst 1.8.9 
Collections 2.1.4 
Mathematics 1.2.6

Hi,

Can't reproduce this. What are your project's quality settings for Android, and your lighting settings for the scene?
Reply
#3
(30-11-2023, 07:28 AM)josemendez Wrote: Hi,

Can't reproduce this. What are your project's quality settings for Android, and your lighting settings for the scene?
Indeed I have never changed settings yet, so quality settings has been set to URP-Baranced without any tweaks.
For the lighting, I don't touch any lighting or light settings of the FluidViscosty.scene.
This project only contains Obi7Fluid_beta and minimal assets for Meta Quest development because I newly created a project to scope down the source of issues.
I have another project which I have tweaked some quality settings such as lighting and shadows emits the exact same error though.
I attach a screenshot with which you may be able to grab some information of the project but if you need any other information, let me know please.
Thanks!
   
Reply
#4
Hi,

Could reproduce this, and found a somewhat strange solution: remove "Built-in" from the shader's compilation targets list in ShaderGraph:

[Image: 2CQAJzP.png]

Now, why would having an unused render pipeline in the list of targets affect compilation for an entirely different pipeline is beyond me. Imho, this is a bug in ShaderGraph.

let me know whether this fixes it for you too.

kind regards,
Reply
#5
(30-11-2023, 09:50 AM)josemendez Wrote: Hi,

Could reproduce this, and found a somewhat strange solution: remove "Built-in" from the shader's compilation targets list in ShaderGraph:

[Image: 2CQAJzP.png]

Now, why would having an unused render pipeline in the list of targets affect compilation for an entirely different pipeline is beyond me. Imho, this is a bug in ShaderGraph.

let me know whether this fixes it for you too.

kind regards,
By removing Built in from the Active Target, I got another error like this:
Code:
Shader error in 'Shader Graphs/Master': Invalid conditional expression. at /UnityProjects/URP_Obi7/Library/PackageCache/com.unity.render-pipelines.universal@14.0.9/ShaderLibrary/Shadows.hlsl(284)
   
Thanks.
Reply
#6
(30-11-2023, 10:07 AM)Snail921 Wrote: By removing Built in from the Active Target, I got another error like this:
Code:
Shader error in 'Shader Graphs/Master': Invalid conditional expression. at /UnityProjects/URP_Obi7/Library/PackageCache/com.unity.render-pipelines.universal@14.0.9/ShaderLibrary/Shadows.hlsl(284)

Thanks.

This isn't an error on any of the Obi shaders, but on URP itself. A quick search reveals it's a bug in URP 14, see:
https://forum.unity.com/threads/unity-20...r.1390798/

This is the bug entry in their bug tracker:
https://issuetracker.unity3d.com/issues/...-is-opened
Reply
#7
(30-11-2023, 10:52 AM)josemendez Wrote: This isn't an error on any of the Obi shaders, but on URP itself. A quick search reveals it's a bug in URP 14, see:
https://forum.unity.com/threads/unity-20...r.1390798/

This is the bug entry in their bug tracker:
https://issuetracker.unity3d.com/issues/...-is-opened
Oh I see. Thank you so much for the information.
Some people said 2023 has performance overhead issue so I almost decided to go with 2022 for the next project but I will try 2023 for Obi7.
Few questions.
  • Which version of unity do you use for developing Obi 7? 
  • Which version do you recommend for it?
  • Fluid is not rendered in Quest3 when the solver set to compute. Do I miss something? or Is it supposed behavior?
Thanks!
Reply