protected override void activate(int pass, AsContext3D context, AsTexture texture)
 {
     updateParameters(pass, (int)(texture.getWidth() * texture.getScale()), (int)(texture.getHeight() * texture.getScale()));
     context.setProgramConstantsFromVector(AsContext3DProgramType.VERTEX, 4, mOffsets);
     context.setProgramConstantsFromVector(AsContext3DProgramType.FRAGMENT, 0, mWeights);
     if(mUniformColor && pass == getNumPasses() - 1)
     {
         context.setProgramConstantsFromVector(AsContext3DProgramType.FRAGMENT, 1, mColor);
         context.setProgram(mTintedProgram);
     }
     else
     {
         context.setProgram(mNormalProgram);
     }
 }
 protected override void activate(int pass, AsContext3D context, AsTexture texture)
 {
     context.setProgramConstantsFromVector(AsContext3DProgramType.FRAGMENT, 0, mOnes, 1);
     context.setProgramConstantsFromVector(AsContext3DProgramType.FRAGMENT, 1, mMinColor, 1);
     context.setProgram(mShaderProgram);
 }
 protected override void activate(int pass, AsContext3D context, AsTexture texture)
 {
     context.setProgramConstantsFromVector(AsContext3DProgramType.FRAGMENT, 0, mShaderMatrix);
     context.setProgramConstantsFromVector(AsContext3DProgramType.FRAGMENT, 5, MIN_COLOR);
     context.setProgram(mShaderProgram);
 }