AlphaThreshold and DepthPass

Software: Away3D 4.x

Jean Carlo Deconto, Newbie
Posted: 20 March 2012 03:49 PM   Total Posts: 29

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 Stage3DProxycamera Camera3DdistanceBased Boolean false) : void

 
if (distanceBased{
  _distancePass
.alphaMask _screenPass.diffuseMethod.texture;
 
}
 
else {
  _depthPass
.alphaMask _screenPass.diffuseMethod.texture;
 
}
 super
.activateForDepth(stage3DProxycameradistanceBased);
   

Avatar
kurono, Sr. Member
Posted: 02 May 2012 10:06 AM   Total Posts: 103   [ # 1 ]

Thanksa lot, Jean! You saved my time!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X