Yes, that's correct. In the same way the Dot3 materials only support
DirectionalLight3D, the single pass Pixel Bender filters only support point
and ambient lights. This is simply for the reason that the Dot3 shaders
would be far more efficient (directional light doesn't necessarily need to
perform calculations on every single pixel independently). Multipass does
support them because in of several light sources could just be a directional
(as in the moonlight of lantern demo:
http://www.derschmale.com/demo/away3d/multipassLantern/).
The TangentToObjectMapper is responsible for that, but it still requires
your textures to be uniquely mapped. Primitives such as Cube are not since
every face reuses the same area in the  texture, but the Sphere primitive
is.

On Fri, Feb 19, 2010 at 11:45 AM, Sylvain Godbert <[email protected]
> wrote:

> Hi David,
>
> Thanks for your answer.
>
> Also, I experienced that "DirectionalLight3D" does not work with
> "SpecularPBMaterial", "DiffusePBMaterial" and "PhongPBMaterial"
> materials, but it does with "PhongMultiPassMaterial" material. Could
> you confirm that this is correct ?
>
> I was wondering whether "TangentToObjectMapper.transform" can be used
> to tranform a tangent-space normal map to an object-space normal map
> for an Away3D primitive (like a cube for instance).
>
> Sylvain
>
>
> On 19 fév, 09:13, David Lenaerts <[email protected]> wrote:
> > Hi Sylvain,
> >
> > Adding an AmbientLight3D is indeed the only way to add ambient light
> using
> > any of the PB shaders. The ambient component of PointLight3D is more of a
> > legacy property.
> >
> > Cheers,
> > David
> >
> > On Thu, Feb 18, 2010 at 11:41 PM, Sylvain Godbert <
> [email protected]
> >
> >
> >
> > > wrote:
> > > Hi,
> >
> > > I have a mesh that has a DiffusePBMaterial material. On the scene
> > > there is a light whose type is PointLight3D.
> > > I would like to add an ambiant light to my scene, but it seems that
> > > the ambiant component of this light is not taken into account by the
> > > DiffusePBMaterial material.
> > > I have seen on some exemples that an ambient light could be done by
> > > adding a AmbientLight3D light to the scene.
> > > Is it the only solution ? Is there a way of getting the ambiant
> > > component of the PointLight3D light working with DiffusePBMaterial ?
> >
> > > Cheers
> >
> > > Sylvain
> >
> > --http://www.derschmale.com
>



-- 
http://www.derschmale.com

Reply via email to