shibbo / Fushigi

An editor for Super Mario Bros. Wonder.
MIT License
133 stars 30 forks source link

Unit 0 GLD_TEXTURE_INDEX_2D is unloadable Mac M1 #92

Open piook8 opened 10 months ago

piook8 commented 10 months ago

Describe the bug Textures won't load so Fushigi crashes when opening a course

To Reproduce

When opening Fushigi this pops up in the Terminal

Zerp@MacBook-Pro Fushigi % /Users/zerp/Desktop/Fushigi/Fushigi/bin/Debug/net8.0/Fushigi Starting Fushigi v0.6... Running on osx Loading user settings... Loading parameter database... Loading area parameter loader... Checking for imgui.ini Creating imgui.ini... Created! Initializing Window RomFS::GetFileBytes() -- Pack/Bootup.Nin_NX_NVN.pack.zs UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable

Expected behavior I expected that the texture will load

Operating System: Mac M1

Additional context It seems that it is a problem with openGL in combination with the M1 chip

There’s actually a glitch in Apples custom GLSL compiler. So if you’re using a float in a vertex shader and casting it as an int to index into an array ( or do a switch statement), it will error out. So you’ll have to use if statements. https://www.reddit.com/r/opengl/comments/oc8ec1/opengl_on_mac/