Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfRangeException [Error] [RESOLVED] #24

Closed
RizenSoul opened this issue Apr 9, 2022 · 1 comment
Closed

IndexOutOfRangeException [Error] [RESOLVED] #24

RizenSoul opened this issue Apr 9, 2022 · 1 comment

Comments

@RizenSoul
Copy link

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&)

@RizenSoul
Copy link
Author

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.

@RizenSoul RizenSoul changed the title IndexOutOfRangeException [Error] IndexOutOfRangeException [Error] [RESOLVED] Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant