Closed RizenSoul closed 2 years ago
Resolved. It was caused because of using 1.#INF in AtmosphereCommon.hlsl. If someone else has this issue, disabling "projectSetting/editor/shaderCompilation/cachingPreprocessor" and restarting unity editor will help.
I get an error when I set atmosphere.asset enabled:
IndexOutOfRangeException: Invalid kernelIndex (0) passed, must be non-negative less than 1. ComputeHelper.GetThreadGroupSizes (UnityEngine.ComputeShader compute, System.Int32 kernelIndex) (at Assets/Plugins/Compute Helper/ComputeHelper.cs:149) ComputeHelper.Dispatch (UnityEngine.ComputeShader cs, UnityEngine.RenderTexture texture, System.Int32 kernelIndex) (at Assets/Plugins/Compute Helper/ComputeHelper.cs:39) AtmosphereEffect.InitAndRenderTransmittanceLUT () (at Assets/Scripts/Post Processing/Atmosphere/AtmosphereEffect.cs:208) AtmosphereEffect.SetProperties () (at Assets/Scripts/Post Processing/Atmosphere/AtmosphereEffect.cs:131) AtmosphereEffect.RenderEffectToTarget (UnityEngine.RenderTexture source, UnityEngine.RenderTexture target) (at Assets/Scripts/Post Processing/Atmosphere/AtmosphereEffect.cs:106) PostProcessingEffect.Render (UnityEngine.RenderTexture source) (at Assets/Scripts/Post Processing/PostProcessingEffect.cs:22) PostProcessingManager.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture target) (at Assets/Scripts/Post Processing/PostProcessingManager.cs:38) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)