away3d / away3d-core-fp11

Away3D engine for Flash Player 11
http://www.away3d.com
Other
640 stars 273 forks source link

Skybox flicker #685

Open DarceyLloyd opened 10 years ago

DarceyLloyd commented 10 years ago

Demo: http://www.allforthecode.co.uk/dev/away3d/random_lookat/

Hovercontroller is implemented so you can drag around the screen. If you do so, slowly, you will notice that the skybox will flicker at times often leaving out huge sections of the skybox.

D

DarceyLloyd commented 10 years ago

The flicker is relational to large values used for the camera.lens.far camera.lens.far = 20000; //Add 1 or 2 zeros

JohnBrookes commented 10 years ago

Just as a hack. core.render.DefaultRenderer.as line 188 add * 0.99 eg var a:Number = (q.x_p.x + q.y_p.y + q.z_p.z + q.w_p.w)/(cx_q.x + cy_q.y + cz_q.z + cw_q.w) * 0.99;

Eketol commented 8 years ago

Thanks for this hack John, it saved my day. My camera.lens.far value is 4000. Everything is fine, but when the camera tilts down (moving to an aerial view), skybox flickers. I suspect the yFactor=2 has something to do in my case. Anyway, using a value <= 0.92 did the trick for me. I hope it helps somebody.