I’ve run into a bizarre issue happening when playing with camera settings and a large plane (size 1000). At specific camera positions a line appears through the origin of the plane. I’ve screenshot an example below.
If I resize the browser window and change the canvas size it goes away. I’ve tried to recreate the issue as best I can in the playground (https://www.babylonjs-playground.com/#339A8H. I have manually set the camera position to the problem but it will likely only appear if the window is maximized.
I’m assuming this has to do with Z fighting in some way? But the plane has nothing really to clip with except itself.
I also do not repro. In addition to isolating by removing the GridMaterial, if you can reproduce the artifact while using Spector.js, you should be able to look through the draw calls and see exactly what part of the rendering is causing that artifact to appear.
I’ve removed almost everything from the playground and the problem persists. (Kept the pointer move events so you can drag the camera around and see the line at certain angles). https://www.babylonjs-playground.com/#339A8H#1
SpectreJS shows it’s in the draw call with just a basic plane.
It seems to be at the exact line where the two triangles of the plane form. Turning to wireframe rendering shows it. For now I’ve be able to get rid of the issue by adding more subdivisions to the ground plane.
Yes, I first thought it might be Z clipping or floating point issues with the near/far planes but no matter what I set the values to it would appear.
Only increasing the geometry on the plane seems to solve it. Or reducing the size of the plane will help as well. It seems to be appearing on the line where the two triangles of the plane join.
I’m using a maximized playground window on a 1920x1080 resolution desktop if that helps. It seems to also be affected by render size.
Yes lowering the dimensions of the plane or increasing the number of subdivisions makes the problem go away. I was trying to have the plane scale to put a grid on the whole scene so I guess having a few more vertices won’t hurt in the long run.