-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
Fix: 'internal error: no storage type for block output' #105
Conversation
Fixes errors which appear when loading in state data through variables. Original solution provided by: https://github.com/Akeyn
I tried to play it safe with defines. Let me know if this is not necessary. Not sure how universal [flatten] and [unroll()] are. |
Does unity have any defines that can be checked to enable this? |
I've tried a few of the Unity defines but they didn't seem to get recognized. I didn't see any HLSL specific directives that would work either. I could be wrong, I will keep an eye out for that. If these [flatten] and [unroll()] tags solve Unity specific errors, it might make more sense to rename ENABLE_FLATTEN to UNITY_ENGINE or something. |
Were you having the issue outside of Unity? |
I haven't tested it outside of Unity, but I can try Unreal either tonight or sometime this weekend to see if it suffers a similar issue. |
I'm not too worried about testing other compilers, I think everyone who reported the issue has been using Unity. I just thought from your wording that you weren't using Unity. According to this: https://docs.unity3d.com/Manual/SL-PragmaDirectives.html
|
Hmm, I must have overlooked the UNITY_VERSION define on that page, I did a quick skim. I just tried it out and this one seems to have worked. |
Instead of the current defines could you change it to this:
and define them as empty when not on Unity, assuming empty defines are allowed on HLSL? I think that would be a bit cleaner and easier to read |
Yep I was just working on that. Here is what I put instead.
Leaving the #else off causes issues in Unity when not included. So not sure if that is an issue, so I included the #else. (Having a terrible time with this 'code' thing here haha |
Added better defines for the 'internal error: no storage type for block output' issue in Unity.
All changes have been pushed |
HLSL/FastNoiseLite.hlsl
Outdated
@@ -47,7 +47,7 @@ | |||
// VERSION: 1.0.1 | |||
// https://github.com/Auburn/FastNoise | |||
|
|||
// Switch between using floats or doubles for input position | |||
// [flatten] switch between using floats or doubles for input position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an overzealous find and replace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're too good at this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least it was commented out ;). Let me restore that line.
Thanks! |
Fixes errors which appear when loading in state data through variables.
Works on my end. Please double check before accepting pull request.
Original solution provided by: https://github.com/Akeyn