Does anyone have any thoughts on this problem?  It is preventing me
from using any phong materials in our projects!  I submitted it as
Issue 38 in googlecode.

I just ran the test script against the Away3D trunk and it throws a
compile error:

AbstractRenderSession.as, line 356.  1000: Ambiguous reference to
_spriteLayer.

Help!

Thanks all,
Ralph

On Feb 27, 12:44 pm, Ralph B <[email protected]> wrote:
> If you apply a phong material to an Away3D primitive object, the
> object renders in front of all other objects even if it is behind
> those objects.  It renders OK in Away3D 2.1, but not in 2.2 and 2.2.
>
> Has anyone noticed this, or is there a new way to use phong materials
> that I missed?
> Thanks!
> Ralph
>
> Sample code follows:
>
> //var mat:ShadingColorMaterial = new ShadingColorMaterial
> (0xFFFFFF);  // Renders correctly
> var mat:PhongColorMaterial = new PhongColorMaterial(0xFFFFFF); //
> Cylinder appears in front of Trident
> //var mat:PhongBitmapMaterial = new PhongBitmapMaterial(new BitmapData
> (1, 1, false, 0xFFFFFF )); // Same problem
> var cyl:Cylinder = new Cylinder();
> cyl.material = mat;
> cyl.x = -100; cyl.z = -100;
>
> var trident:Trident = new Trident();
> view.scene.addChildren(cyl, trident);
>
> var light:DirectionalLight3D;
> light = new DirectionalLight3D({color:0xFFFFFF, ambient:0.2, diffuse:.
> 5, specular:0.25});
> light.x = 6000; light.z = -6000; light.y = 9000;
> view.scene.addChild(light);
> view.camera.moveTo(2000, 2000, 2000); // Away3D 2.2 & 2.3 syntax
> view.camera.lookAt(new Number3D(0, 0, 0));
> view.camera.zoom = 20;
> view.renderer = Renderer.CORRECT_Z_ORDER;
> view.render();

Reply via email to