Grégory
Grégory

Reputation: 13

Threejs: Texture and zooming out

I test threejs and I have this problem:

Please check this link

I do not understand why shapes placed in the background are visible through the foreground shape when zoom in and out. Do you have an idea?

Gif Image

Upvotes: 1

Views: 854

Answers (1)

Eerik Kivistik
Eerik Kivistik

Reputation: 176

It has to do with z-fighting https://en.wikipedia.org/wiki/Z-fighting An easy fix for your case would be to change your "nearPlane" value from .1 to for example 2.

Upvotes: 1

Related Questions