timkurvers / valheim-macos

Build-your-own Valheim build for macOS
MIT License
274 stars 14 forks source link

Activating Shield Generator Makes Entire Screen Pink #95

Open MrDolphinCodes opened 2 months ago

MrDolphinCodes commented 2 months ago

Whenever I activate the new shield generator my entire screen become pink (image below) and even if I leave the area of the shield it remains so. I have tried re-logging and it does not fix it either. This bug seems to only be happening on my mac and not my pc. To end up fixing it I had a friend log onto my world on his pc and destroy the shield generator which made it normal again. Not sure if you can do anything about it or if it is just a bug that the Valheim developers need to fix. Either way if anyone comes across this bug just destroy the generator and everything will be fixed.

Screenshot 2024-04-26 at 12 31 39 AM
timkurvers commented 2 months ago

Thanks for reporting this. When testing Ashlands briefly, I noticed a shader error in the log, something along the lines of: ERROR: Shader: Shield Generator is incompatible with this GPU.

Edit: The error message is in fact: ERROR: Shader Hidden/ShieldDomePass shader is not supported on this GPU (none of subshaders/fallbacks are suitable).

Preliminary thought: Valheim 0.217.40 seemingly introduced some new features for modding, so perhaps we can leverage that to 'fix' this shield generator shader so that it is compatible with OpenGL 4.1 on macOS.

MrDolphinCodes commented 2 months ago

I'll take a look at trying to make a client side mod that'll fix the issue but I don't have much modding experience other than Minecraft. Also I am going to see if I can get it to work using Apple's Game Porting Toolkit. I have been able to get Elden Ring and several other games running smoothly on my M1 Macbook Air using this method.

timkurvers commented 2 months ago

Also I am going to see if I can get it to work using Apple's Game Porting Toolkit. I have been able to get Elden Ring and several other games running smoothly on my M1 Macbook Air using this method.

I can confirm the game runs via CrossOver 24.x (which contains parts of Apple's Game Porting Toolkit) if that is of any help. Would expect the toolkit standalone to also run the game.

MrDolphinCodes commented 2 months ago

The shield generator is working on the Game Porting Toolkit as well as CrossOver so this is a workaround option for now. It isn't the greatest solution as the game gets a bit choppy and slow unlike your port which has it running like butter.

Screenshot 2024-04-26 at 12 44 11 PM
drummercraig commented 1 month ago

I have run into the pink issue by dying in Lava. As soon as I get close to retrieving my tombstone it turns pink again and cannot do anything. Just wanted to add this as it's not just Shield Generator problem.

MrDolphinCodes commented 1 month ago

Very strange. I have beaten the ashlands in several playthroughs (I have practically explored the entire biome on one of them in creative) and haven’t run into that issue at all other than the generator. Is this on multiplayer or single player and is there anything in the area that you suspect might be causing this issue? Also if you can look through your log and see if any errors are being thrown that would be amazing!

drummercraig commented 1 month ago

Yes. I've played a bit in Ashlands, raided castles etc. Could you guide me to where the log might be or what it's called? Also, I am playing on a modded world and that may be part of it...although nothing was touched in the Ashlands.

timkurvers commented 1 month ago

Could you guide me to where the log might be or what it's called?

You can find the log files here: ~/Library/Logs/IronGate/Valheim, where ~ is your home folder. If you cannot see the Library folder there, you may have to enable it using View Options in your home folder.

drummercraig commented 1 month ago

Well I wasn't able to duplicate the issue dying in Lava again but apparently I did go into an area that had a shield generator as it went pink. Here is an excerpt of the log:

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ShieldGenerator.UpdateShield () (at <186f1bc3e8634801b40e626890156b17>:0)

NullReferenceException: Object reference not set to an instance of an object at ShieldGenerator.UpdateShield () [0x000e8] in <186f1bc3e8634801b40e626890156b17>:0

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ShieldGenerator.UpdateShield () (at <186f1bc3e8634801b40e626890156b17>:0)

NullReferenceException: Object reference not set to an instance of an object at ShieldGenerator.UpdateShield () [0x000e8] in <186f1bc3e8634801b40e626890156b17>:0

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ShieldGenerator.UpdateShield () (at <186f1bc3e8634801b40e626890156b17>:0)

NullReferenceException: Object reference not set to an instance of an object at ShieldGenerator.UpdateShield () [0x000e8] in <186f1bc3e8634801b40e626890156b17>:0

WARNING: RGBA Compressed BC7 sRGB format is not supported, decompressing texture WARNING: RGBA Compressed BC7 UNorm format is not supported, decompressing texture [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ShieldGenerator.UpdateShield () (at <186f1bc3e8634801b40e626890156b17>:0)

NullReferenceException: Object reference not set to an instance of an object at ShieldGenerator.UpdateShield () [0x000e8] in <186f1bc3e8634801b40e626890156b17>:0

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ShieldGenerator.UpdateShield () (at <186f1bc3e8634801b40e626890156b17>:0)

NullReferenceException: Object reference not set to an instance of an object at ShieldGenerator.UpdateShield () [0x000e8] in <186f1bc3e8634801b40e626890156b17>:0

WARNING: RGBA Compressed BC7 UNorm format is not supported, decompressing texture WARNING: RGBA Compressed BC7 sRGB format is not supported, decompressing texture WARNING: RGBA Compressed BC7 UNorm format is not supported, decompressing texture WARNING: RGBA Compressed BC7 sRGB format is not supported, decompressing texture WARNING: RGBA Compressed BC7 sRGB format is not supported, decompressing texture WARNING: RGBA Compressed BC7 sRGB format is not supported, decompressing texture WARNING: RGBA Compressed BC7 UNorm format is not supported, decompressing texture WARNING: RGBA Compressed BC7 sRGB format is not supported, decompressing texture WARNING: RGBA Compressed BC7 UNorm format is not supported, decompressing texture [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ShieldGenerator.UpdateShield () (at <186f1bc3e8634801b40e626890156b17>:0)

Dm1tryRin commented 1 month ago

The pink colour in Unity is usually materials that don't fit the right Render Pipeline.

timkurvers commented 1 month ago

Just a quick update: contacted IronGate about this on their official Discord and got the following response:

There will be more compatibility introduced in near future.

There is hope 🙌

kaihenzler commented 1 month ago

Valheim seems to be released officially for Mac on June 10th

https://x.com/Valheimgame/status/1797976849173082215