Hello,
I have a texture display problem which only occures with ATI gfx cards with hardware acceleration turned on. Since I am not getting any errors and my knowledge about shaders is to low, I don’t know where to search or how to fix it.
I had this problem with ati cards with variius versions of away3d with different results. Most of the times the textures where not displayed at all. In one beta dev version it worked correct.
This is how it curruently looks:
Correct textures
Wrong textures
I am handleing the texture assignment a bit different than the tutorials show, thats because I need to replace (or add another texture layer on a bitmap) them during runtime.
The mesh is generated from a loaded and parsed binary:
meshVO.mesh = new Mesh(_meshes[meshVO.name].geometry, null);
meshVO.mesh.material = textureService.requestTexture(meshVO.texture);
The textureService assigns a LoadedTextureMaterial which extends TextureMaterial to the mesh.material. The material initialy has a default blackbitmap, which is later replaced with the loaded texture.
public function LoadedTextureMaterial(nrOfLayers:int)
{
super(new BitmapTexture(new BitmapData(64, 64, false, 0x000000)));
_nrOfLayers = nrOfLayers;
_nrOfLoadedTextures = 0;
_textures = new Array();
bothSides = true;
gloss = 15;
specular = .2;
ambient = 1;
alpha = 0.2;
}
public function textureDataReady():void
{
try {
lightPicker = light_picker;
BitmapTexture(texture).bitmapData = mergeBitmap(); // <- new bitmapdata
alpha = 1;
alphaBlending = false;
}
catch(e:Error)
{
trace("texture error.");
}
}
Again, the problem is only on ATI cards, no matter if OSX or windows, no matter if Chrom or any other browser, no matter if debug or relase flash player. The away3d lib is compiled with ASC 2.0, also the relase swf. Testet player version latest (11.8). Away3d 4.1.4.
I tryed reassigning material settings or even creating complet new materials, nothing helped.
Any help would be greatly appreciated.
Thanks
Dirk