[Papervision3D] layered shaders???

xero xero.nu at gmail.com
Tue Mar 4 05:40:26 PST 2008


 have a look at this great post on john's blog

http://www.rockonflash.com/blog/?p=92

you'll notice the code on shaders

[code]
// create your light
var pointLight:PointLight3D = new PointLight3D();
pointLight.moveUp(350);
pointLight.moveRight(350);
// create your materials
var earthMaterial:MovieAssetMaterial = new MovieAssetMaterial("earthMap");
var earthBumpMaterial:MovieAssetMaterial = new MovieAssetMaterial(
"earthMapBump2");
// create shader
var earthShader:PhongShader = new PhongShader(pointLight, 0xFFFFFF,0x303030,
20, earthBumpMaterial.bitmap, earthMaterial.bitmap);
// combine shader with original material, for a shaded material
var earthShadedMaterial:ShadedMaterial = new ShadedMaterial(earthMaterial,
earthShader);
// add to sphere
var earth:Sphere = new Sphere(earthShadedMaterial, 250, 12, 12)scene.
addChild(earth);

[/code]

enjoy!
____  ___
\   \/  /___________  ____
.\     // __ \_  __ \/ _  \
./     \  ___/ | | \( <_>  )
/___/\  \___  >__|---\____/
|     \_/   \/        |
| xero harrison       |
| xero.nu at gmail.com   |
| http://xero.nu      |
| http://fontvir.us   |
| http://0x000000.nu  |
| http://xero.owns.us |
`---------------------'



> ---------- Forwarded message ----------
> From: miaalanna <mail at mia-alanna.com>
> To: papervision3D at osflash.org
> Date: Mon, 3 Mar 2008 20:25:08 -0800 (PST)
> Subject: [Papervision3D] layered shaders???
>
>
> Hey :)  I am making a pv desktop widget and its all done however my cube
> which spins around and has a mc on each face looks very flat and boring
> without any lighting :(
> However I have to use MovieAssetMaterial for my materials and cannot use
> any
> shaders to make it reflective or anything can I ??
>
> Anyone know of a solution?
>
> Thanks!
> --
> View this message in context:
> http://www.nabble.com/layered-shaders----tp15820162p15820162.html
> Sent from the Papervision3D mailing list archive at Nabble.com<http://nabble.com/>
> .
>
>
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080304/750e8a4a/attachment-0001.html 


More information about the Papervision3D mailing list