Hi guys,
This one is likely a devs question, but anyone who knows please provide input. So I’m looking at PhongBitmapMaterial and CompositeMaterial. I see that PhongBitmapMaterial extends CompositeMaterial. I also see that PBM sets up a TransformBitmapMaterial on the bitmapData object passed in the constructor, and adds an additional CompositeMaterial _phongShader object that contains a AmbientShader and a DiffusePhongShader. If a specular value is set, yet another layer is added directly to the base CompositeMaterial layer.
So there’s
addMaterial(_textureMaterial);
addMaterial(_phongShader);
and possibly
addMaterial(_specularPhongShader);
My question is do those shader layers make shading possible since they are “on top” in terms of coming last in the materials array of CompositeMaterial?
For instance, if I wrote my code in a way that I had a base CompositeMaterial and I added BitmapMaterials and TransformBitmapMaterials to it and then always made sure the top material layers were the same shader layers that PhongBitmapMaterial uses, would that give me shading as kind of an overlay to all the underlying material layers?