Inspirateur / riverbed

A Minecraft-inspired Bevy game
MIT License
28 stars 1 forks source link

Some blocks are see-through although they shouldn't be #4

Closed nerdachse closed 5 months ago

nerdachse commented 6 months ago

Hey there!

Thanks again for your inspiring work. Checking out the latest commit 18a43df2fcccb02152d179aa40d752b28be2abc3 (https://github.com/Inspirateur/ourcraft/tree/18a43df2fcccb02152d179aa40d752b28be2abc3) I found a small bug.

I didn't investigate too much yet, maybe it's happening at the chunk borders?

screenshot_25 03 2024-08 12 04 screenshot_25 03 2024-08 11 56

Inspirateur commented 6 months ago

Yep I saw it too, I'm not sure why this happens, I haven't changed the meshing code much besides using the greedy meshing function from the block-mesh crate (which should be reliable) and compressing the mesh data.

The bug only seems to occur after a lot of chunks were already meshed (+ it behaves very strangely), so I'm wondering if this is caused by hitting a memory limit ?

In any case I'll be upgrading this soon to be even more optimized so we'll see if the bug stays (thanks for the issue nonetheless) :+1:

Inspirateur commented 6 months ago

After some testing I know this is not a memory issue but i still have no idea what causes this... it doesn't seem to be caused by chunk boundaries, it's probably related to greedy meshing because i'm pretty sure it wasn't there before i used greedy meshing.

Inspirateur commented 6 months ago

I have little hope it gets adressed but I put up an issue summing everything I found so far on the block-mesh repo https://github.com/bonsairobo/block-mesh-rs/issues/29

Inspirateur commented 5 months ago

Seems like it will be addressed soon🤞 !

Inspirateur commented 5 months ago

Good news ! I fixed the main reasons for holes, but i found a completely unrelated second reason that could also produce holes (but more rarely) and I identified the issue. Since they are technically 2 separates issues i'm going to close this one and open another one