Moonlit-Games/Ultimate-Water-System

Upgrade from Playway causes Water Quality Settings corruption (Texture has out of range width / height)

Closed this issue · 5 comments

Reason: upgrading from Playway Water causes corruption of the Water Quality settings

This happens on all the demo scenes.

Texture has out of range width / height
UnityEngine.Texture2D:.ctor(Int32, Int32, TextureFormat, Boolean, Boolean)
UltimateWater.Internal.GpuFFT:CreateButterflyTexture() (at Assets/Ultimate Water System/Scripts/Spectra/FFT/GpuFFT.cs:99)
UltimateWater.Internal.GpuFFT:CreateTextures() (at Assets/Ultimate Water System/Scripts/Spectra/FFT/GpuFFT.cs:56)
UltimateWater.Internal.GpuFFT:.ctor(Int32, Boolean, Boolean, Boolean) (at Assets/Ultimate Water System/Scripts/Spectra/FFT/GpuFFT.cs:29)
UltimateWater.Internal.Dx11FFT:.ctor(ComputeShader, Int32, Boolean, Boolean) (at Assets/Ultimate Water System/Scripts/Spectra/FFT/Dx11FFT.cs:13)
UltimateWater.WavesRendererFFT:ChooseBestFFTAlgorithm(Boolean) (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:318)
UltimateWater.WavesRendererFFT:ValidateFFT(GpuFFT&, Boolean, Boolean) (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:301)
UltimateWater.WavesRendererFFT:ValidateResources() (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:182)
UltimateWater.WavesRendererFFT:Enable() (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:124)
UltimateWater.WindWaves:ResolveFinalSettings(WaterQualityLevel) (at Assets/Ultimate Water System/Scripts/WindWaves/WindWaves.cs:430)
UltimateWater.WindWaves:.ctor(Water, Data) (at Assets/Ultimate Water System/Scripts/WindWaves/WindWaves.cs:261)
UltimateWater.Water:CreateWaterComponents() (at Assets/Ultimate Water System/Scripts/Water.cs:614)
UltimateWater.Water:OnEnable() (at Assets/Ultimate Water System/Scripts/Water.cs:272)
UnityException: Failed to create texture because of invalid parameters.
UnityEngine.Texture2D..ctor (Int32 width, Int32 height, TextureFormat format, Boolean mipmap, Boolean linear) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/TextureBindings.gen.cs:180)
UltimateWater.Internal.GpuFFT.CreateButterflyTexture () (at Assets/Ultimate Water System/Scripts/Spectra/FFT/GpuFFT.cs:99)
UltimateWater.Internal.GpuFFT.CreateTextures () (at Assets/Ultimate Water System/Scripts/Spectra/FFT/GpuFFT.cs:56)
UltimateWater.Internal.GpuFFT..ctor (Int32 resolution, Boolean highPrecision, Boolean twoChannels, Boolean usesUAV) (at Assets/Ultimate Water System/Scripts/Spectra/FFT/GpuFFT.cs:29)
UltimateWater.Internal.Dx11FFT..ctor (UnityEngine.ComputeShader shader, Int32 resolution, Boolean highPrecision, Boolean twoChannels) (at Assets/Ultimate Water System/Scripts/Spectra/FFT/Dx11FFT.cs:13)
UltimateWater.WavesRendererFFT.ChooseBestFFTAlgorithm (Boolean twoChannels) (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:318)
UltimateWater.WavesRendererFFT.ValidateFFT (UltimateWater.Internal.GpuFFT& fft, Boolean present, Boolean twoChannels) (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:301)
UltimateWater.WavesRendererFFT.ValidateResources () (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:182)
UltimateWater.WavesRendererFFT.Enable () (at Assets/Ultimate Water System/Scripts/WindWaves/WavesRendererFFT.cs:124)
UltimateWater.WindWaves.ResolveFinalSettings (WaterQualityLevel quality) (at Assets/Ultimate Water System/Scripts/WindWaves/WindWaves.cs:430)
UltimateWater.WindWaves..ctor (UltimateWater.Water water, UltimateWater.Data data) (at Assets/Ultimate Water System/Scripts/WindWaves/WindWaves.cs:261)
UltimateWater.Water.CreateWaterComponents () (at Assets/Ultimate Water System/Scripts/Water.cs:614)
UltimateWater.Water.OnEnable () (at Assets/Ultimate Water System/Scripts/Water.cs:272)

unity: 2017.1.2f1
uws version: 1.0.0
spec: ?
issued by: @stevenwanhk

Hi!
Do you have any other Unity versions easily available, so you could check if the problem persists across them on the hardware you have?

Things to check:

  • check if version 2017.1.2f1 was tested, if not - test

Possible reasons:
- [ ] graphics card does not support large texture resolutions / NPOT textures
- [ ] graphics card does not support on of the TextureFormats used

Tested Unity 5.6.3p4, no error.

I guess this is not UWS issue. I opened a new project and imported UWS in 2017.1.2f1, it works.
The project raised the above error was imported PWS before, and I removed the whole PWS folder and imported UWS.

I tried to remove UWS and imported it again, still no luck. Any guess?

My spec:
i5-6500
GeForce GTX 970
16GB ram

I guess the quality setting in the project is broken. I deleted the quality setting and go back to default one. It works now. Thank you.

Thank you for your time and for the solution provided.

Fixed the problem with creation of new Water Quality Profiles.