Moonlit-Games / Ultimate-Water-System

15 stars 7 forks source link

Shaders don't work with 2017.3 #44

Closed eobet closed 6 years ago

eobet commented 6 years ago

You either get an error like this:

Shader error in 'UltimateWater/Variations/Water Volume _ALPHABLEND_ON _CUBEMAP_REFLECTIONS _WATER_RECEIVE_SHADOWS _WATER_REFRACTION _WATER_OVERLAYS _WAVES_FFT _PROJECTION_GRID': invalid subscript 'vec' at Assets/Ultimate Water System/Shaders/Includes/UnityStandardShadow.cginc(120) (on d3d11)

Or you get an error like this:

InvalidOperationException: Water in a scene 'Wake water' doesn't contain necessary shaders to function properly. Please open this scene in editor and simply select the water to update its shaders. UltimateWater.WaterMaterials.CreateMaterials () (at Assets/Ultimate Water System/Scripts/WaterMaterials.cs:415) UltimateWater.WaterMaterials.Awake (UltimateWater.Water water) (at Assets/Ultimate Water System/Scripts/WaterMaterials.cs:319) UltimateWater.Water.Awake () (at Assets/Ultimate Water System/Scripts/Water.cs:316)

Either way, with the first error, water may display in the Unity Editor game window, but with both errors, you can't get any water to display at all in a build.

eobet commented 6 years ago

Shader error in 'UltimateWater/Variations/Water Volume _ALPHAPREMULTIPLY_ON _WATER_OVERLAYS _WAVES_FFT _PROJECTION_GRID': invalid subscript 'vec' at Assets/Ultimate Water System/Shaders/Includes/UnityStandardShadow.cginc(120) (on d3d11)

Compiling Vertex program with SHADOWS_CUBE _WAVES_FFT _WATER_OVERLAYS 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_RGBM_ENCODING

Error building Player: Shader error in 'UltimateWater/Variations/Water Volume _ALPHAPREMULTIPLY_ON _WATER_OVERLAYS _WAVES_FFT _PROJECTION_GRID': invalid subscript 'vec' at Assets/Ultimate Water System/Shaders/Includes/UnityStandardShadow.cginc(120) (on d3d11)

Compiling Vertex program with SHADOWS_CUBE _WAVES_FFT _WATER_OVERLAYS 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_RGBM_ENCODING

Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

eobet commented 6 years ago

Issue persists after recalculating the shader sets.

joaquingrech commented 6 years ago

someone posted the solution on the forum since here they don't seem to be able to help much. I hope it helps:

It can be fixed with replacing the line 52 of "Assets/Ultimate Water System/Shaders/Includes/UnityStandardShadow.cginc" with: Code (CSharp):

if defined(SHADOWS_CUBE) && !defined(SHADOWS_CUBE_IN_DEPTH_TEX)

V2F_SHADOW_CASTER_NOPOS

endif

And change the line 120 of "Assets/Ultimate Water System/Shaders/Includes/UnityStandardShadow.cginc" with: Code (CSharp): // #ifdef SHADOWS_CUBE

if defined(SHADOWS_CUBE) && !defined(SHADOWS_CUBE_IN_DEPTH_TEX)

MCPGNZ commented 6 years ago

I mentioned this in forum thread, I've added the solution to the previous hotfix.