diff --git a/cocos/3d/framework/skinning-model-component.ts b/cocos/3d/framework/skinning-model-component.ts index 8fdf4ee432..329fbf1e18 100644 --- a/cocos/3d/framework/skinning-model-component.ts +++ b/cocos/3d/framework/skinning-model-component.ts @@ -147,8 +147,9 @@ export class SkinningModelComponent extends ModelComponent { const device = _getGlobalDevice(); const useJointTexture = !__FORCE_USE_UNIFORM_STORAGE__ && device !== null && device.hasFeature(GFXFeature.TEXTURE_FLOAT); const mat = this.getMaterial(0, CC_EDITOR)!; + const effectAsset = mat.effectAsset; mat.destroy(); - mat.initialize({ defines: { CC_USE_SKINNING: true, CC_USE_JOINTS_TEXTURE: useJointTexture } }); + mat.initialize({ effectAsset, defines: { CC_USE_SKINNING: true, CC_USE_JOINTS_TEXTURE: useJointTexture } }); } private _bindSkeleton () {