Closed DrUm78 closed 2 years ago
This is because there's no skybox at all in these cases. The software renderer does not clear the color buffer at the start of each frame, leading to the garbage you see, because I assumed there's gonna be either a skybox or a wall in the way at all times, so always clearing the color buffer is a waste of CPU time. I guess I forgot about these cases. The proper fix would be to check if there's no skybox and issue color clears if that is the case.
Thanks for the fast answer. Yeah that makes sense now. I hope you will be able to fix it soon, thanks. 🤞
I had a look into the code in skybox.c but that is way beyond my coding skill I fear. Would it be as easy as checking if a skybox exists then clearing the color buffer if not, all this in one part of the code only? If so, any hint how I could fix it on my side? Some levels are quite unplayable with this broken display.
Thanks in advance.
This should be fixed in a590e0e.
Awesome thanks! I just needed to modify this to make it work, otherwise that does not fix the bug: https://github.com/fgsfdsfgs/sm64-port/commit/a590e0ea340450de68d55d64d2b094a7b2179caf#r75618529
Thank you again.
It works on my machine. Or at least it does with draw_sky false
. Make sure to do a clean build.
Yeah I use make distclean
before. With your code, it only works with draw_sky false
(I use 'true' here). Works in both cases with if (sSkyboxEmpty = TRUE)
but maybe that's more cpu expensive.
Oh yeah, it won't actually work when there's no skybox at all. Hold on. upd: Turns out it's more due to the fillrect function not working correctly, as the game itself is supposed to clear the screen when there's no skybox.
Should work correctly now with 32bd7b3c.
Works fine both with draw_sky false
and draw_sky true
, thanks again for your amazing work on the software renderer part.
Software: SM64 decompilation fork: https://github.com/DrUm78/sm64-funkey Hardware: FunKey S device (armv7 a7)
During indoor sliding sequences (solo or against the penguin) skybox is not drawn and creates a severe graphic glitch with software renderer (the FunKey S does not have any gpu). This bug happens the same way everywhere in the game when setting "draw_sky false" in sm64config.txt, so it seems to be related to the "sky draw" function.
Steps to reproduce:
Video footage: https://drive.google.com/file/d/1V45Cr2E5a4YB7AfgNtM4lqs26_2CLkBW/view?usp=sharing
Same happens on RS-97: https://youtu.be/NqOECYL70mg?t=66