brlrt / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

outline showing through other objects #144

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. view = new View3D({x:250,y:200, renderer:Renderer.CORRECT_Z_ORDER}); 
2. cube.outline = outlineMaterial;
(see example code provided below)

What is the expected output? What do you see instead?
You'd expect the outline to not show of objects that are positioned completely 
behind other objects. Instead the outline is showing through other objects.

What version of the product are you using? On what operating system?
3.6. Windows xp.

Please provide any additional information below.
Here is example code of the bug:

package {
    import away3d.containers.View3D;
    import away3d.materials.WireframeMaterial;
    import away3d.primitives.Cube;
    import away3d.core.render.Renderer;

    import flash.display.Sprite;

    [SWF(width="500", height="400", frameRate="60", backgroundColor="#FFFFFF")]
    public class BugExample extends Sprite
    {
        public var view:View3D;
        private var cube:Cube;
        private var cube2:Cube;

        public function BugExample()
        {
            view = new View3D({x:250,y:200, renderer:Renderer.CORRECT_Z_ORDER});
            addChild(view);

            cube = new Cube();
            cube2 = new Cube();

            var outlineMaterial:WireframeMaterial = new WireframeMaterial(0x000000);
            outlineMaterial.thickness = 3;
            //cube.outline = outlineMaterial;
            cube2.outline = outlineMaterial;

            cube.z = -300;

            view.scene.addChild(cube);
            view.scene.addChild(cube2);

            view.render();
        }

    }
}

Original issue reported on code.google.com by bnkon...@gmail.com on 19 Jan 2011 at 3:01

GoogleCodeExporter commented 8 years ago
Hi I used to have the same problem. It seems that in revision 2786 the guys 
changed a little bit getUVT method in ViewSourceObject.
Changing back the return result in line 303 from return new Vector3D(0, 0, 
(_da/_v0z + _db/_v1z) / _det); to return new Vector3D(0, 0, (_da*_v0z + 
_db*_v1z) / _det); did the job for me. I hope this will help you.

Original comment by stefan.t...@gmail.com on 26 Nov 2011 at 10:43