Bug in my Away3D:
material.alphaBlending = true;
material.alphaThreshold = .5;
TypeError: Error #1009: Cannot access a property or method of a null object reference. Acessing variable _alphaMask:
DepthMapPass.as
away3d.materials.passes.DepthMapPass.activate(...n). Line 136:
stage3DProxy.setTextureAt(0, _alphaMask.getTextureForStage3D(stage3DProxy));
My Solution:
Set texture before rendering.
DefaultMaterialBase.as
away3d.materials.DefaultMaterialBase.activateForDepth(...n). Line 56:
arcane override function activateForDepth(stage3DProxy : Stage3DProxy, camera : Camera3D, distanceBased : Boolean = false) : void
{
if (distanceBased) {
_distancePass.alphaMask = _screenPass.diffuseMethod.texture;
}
else {
_depthPass.alphaMask = _screenPass.diffuseMethod.texture;
}
super.activateForDepth(stage3DProxy, camera, distanceBased);
}