0

I would like to add "water" to my scene but i'm experiencing flickering whenever my camera gets into the water.

I created a fiddle here, if I move the camera inside the transparent cube the face which touches the face of the solid cube starts to flicker when moving the camera arround.

I tried disabling the depthTest which resolves the flickering issue but when moving the camera the transparent cube is visible when placing the camera behind the solid cube looking at the transparent cube so that's not an option.

I googled a lot and also had a look at some questions at SO and what I found so far is that it's a depth-buffer issue. Also I read that one should draw the solid objects after the translucent objects have been drawn but I think three.js does that for me?

Altogether I haven't found an answer which helps me solving this, I understand that transparency isn't the easiest thing to do in three.js / webgl but I would appreciate some hints on how i can overcome this.

4

1 回答 1

1

The problem is likely the coincident faces.

Remove the touching transparent face.

于 2013-01-11T19:12:26.343 回答