|
|
|
|
|
|
|
|
|
|
|
|
|
|
const target = getOrCall(this._depthPass.target) |
|
|
const target = getOrCall(this._depthPass.target) |
|
|
if (!target) return |
|
|
if (!target) return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const blurTarget = this._viewer.renderManager.getTempTarget<IRenderTarget & WebGLRenderTarget>({ |
|
|
const blurTarget = this._viewer.renderManager.getTempTarget<IRenderTarget & WebGLRenderTarget>({ |
|
|
type: UnsignedByteType, |
|
|
type: UnsignedByteType, |
|
|
format: RGBAFormat, |
|
|
format: RGBAFormat, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected _refreshTransform() { |
|
|
protected _refreshTransform() { |
|
|
super._refreshTransform() |
|
|
|
|
|
|
|
|
if (!super._refreshTransform()) return false |
|
|
|
|
|
|
|
|
if (!this._mesh) return |
|
|
|
|
|
if (!this._viewer) return |
|
|
|
|
|
|
|
|
if (!this._mesh) return false |
|
|
|
|
|
if (!this._viewer) return false |
|
|
|
|
|
|
|
|
this.shadowCamera.position.copy(this._mesh.getWorldPosition(new Vector3())) |
|
|
this.shadowCamera.position.copy(this._mesh.getWorldPosition(new Vector3())) |
|
|
this.shadowCamera.setRotationFromEuler(new Euler(Math.PI / 2., 0, 0)) |
|
|
this.shadowCamera.setRotationFromEuler(new Euler(Math.PI / 2., 0, 0)) |
|
|
|
|
|
|
|
|
this._refreshShadowCameraFrustum() |
|
|
this._refreshShadowCameraFrustum() |
|
|
|
|
|
|
|
|
this._mesh.scale.y = -this.size |
|
|
this._mesh.scale.y = -this.size |
|
|
|
|
|
return true |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private _refreshShadowCameraFrustum() { |
|
|
private _refreshShadowCameraFrustum() { |