Hello, everyone. I have little scene with road mesh. As you can see, displaying is wrong (image texture has lines). Question: what is it and how can i remove it?
Thank you.
Wrong texture displaying
-
- Posts: 17
- Joined: Sun Sep 18, 2016 5:44 pm
- Location: Belarus, Grodno
Re: Wrong texture displaying
Looks like z-fighting to me. Likely you have 2 polygons very close together so they share the same depth-value (depth-buffer usually has only 8 bits so you get 256 different depth-values only). Raise one polygon slightly. A common trick used in games for roads is for example to add sidewalks - that makes it easier to hide that the road is raised above the landscape. You can also try to reduce z-fighting by using a closer near-plane (the depth-buffer resolutions depends on the ratio or distance between near and far-plane), but generally better to solve it by better geometry.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm