splashdust/bevy_voxel_world

Texture bleeds through to opposite face

Closed this issue · 1 comments

hundo commented

I was experimenting with drawing different textures on the side of a cube and discovered that whenever the texture drawn on a cube face is not the same as the one on the opposite face, one of those sides is overlaid with fine diagonal lines of the other side's coloring.

To demonstrate that this issue was not caused by my experimental code, I captured this image using the "textures" example by removing the grass floor and adding a flycam so I could look underneath.
texture_bleed
You can see that cubes with a snowy top are drawn with a distorted bottom while the single-texture cubes are drawn correctly.

Thanks for reporting!

Turns out there was a rounding error when determining the face normal, causing parts of the face getting mapped to the top-side texture index.