[Papervision3D] [Papervision 3D] Shaded Material - still an issue with cubes and planes?
o renken
renkster at gmail.com
Tue Jan 27 10:57:01 PST 2009
Hi Visioners,
is there still an issue with Shaded Material an planes and cubes?
is it the proper way to assign each side of the cube a own Shaded Material
and its shader ( like in the following), or is there something iam missing?
this way brings up some kind of z-fighting inside of the material ( kinda
look like that)
[AS]
var shader : FlatShader = new FlatShader(_light, _light_color,
_ambient_color, _specular_level); // or something else
var compMat : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_b,
0);
var mat_list : MaterialsList = new MaterialsList();
mat_list.addMaterial(compMat, "all");
_cube = new Cube(mat_list, w, w, h, tri, tri, tri);
[/AS]
Is this the proper way?
[AS]
var shader_f : FlatShader = new FlatShader(_light, _light_color,
_ambient_color, _specular_level); // or something else
var shader_b : FlatShader = new FlatShader(_light, _light_color,
_ambient_color, _specular_level);
var compMat_front : ShadedMaterial = new ShadedMaterial(movieMaterial,
shader_f, 0);
var compMat_back : ShadedMaterial = new ShadedMaterial(movieMaterial,
shader_b, 0);
var mat_list : MaterialsList = new MaterialsList();
mat_list.addMaterial(compMat_front, "front");
mat_list.addMaterial(compMat_back, "back");
_cube = new Cube(mat_list, w, w, h, tri, tri, tri);
[/AS]
Thanks in advance,
olee
--
http://www.renkster.de/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090127/239078b2/attachment.html>
More information about the Papervision3D
mailing list