A photo is not rendered fully

I use BJS workshop code: buildFromPlan to build a room, and use createPlane to add a photo, then rotate the room, at some angles the photo is not rendered fully. See the attachments. Here is the playground. If use createPlane to build walls of a room instead of buildFromPlan, I don’t see this issue. Any suggestion?


That is z-fighting: Z-fighting - Wikipedia
The photo is positioned exactly at the position of the wall. Just move the photo a bit away from the wall and it should solve the issue.

4 Likes

You can also change the zOffset property of the material to fix the problem.

2 Likes

Thanks @Kesshi @Evgeni_Popov it fixes my problem.