Hey, I’m new to both threejs and this community so I apologize in advance for any stupidity. I’m trying to make a 3d gravity simulator that moves these “stars” around. It worked fine but then I wanted to put all my code in a container class to be able to manipulate it with buttons and what not in my html. However when I did so every texture of every star was suddenly of a lot lower quality additionally the stars now have this tendency to flicker in and out of existence for different distances from the camera.
I’m not sure because I can’t load the video but it makes me think of “z-fighting” issue
Try adding logarithmicDepthBuffer: true
when intanciating your renderer like in the SO answer?
Hey thanks for the answer, unfortunately I don’t think that is the issue i tried your fix as well and no dice. Previously I also found the z-fighting issue. In my case it’s not two objects fighting for the same pixel (which is what z-fighting refers to) , rather the object itself disappears against the black background.
It’ll help if you provide a minimum live example of your problem with (one) flickering star on jsfiddle or codepen.
It’s hard to guess judging by the video.