|
|
|
@ -23,12 +23,12 @@ export class OutlinePass extends Pass
|
|
|
|
|
maskBufferMaterial: MeshBasicMaterial;
|
|
|
|
|
renderTargetMaskBuffer: WebGLRenderTarget;
|
|
|
|
|
depthMaterial: MeshDepthMaterial;
|
|
|
|
|
prepareMaskMaterial;
|
|
|
|
|
prepareMaskMaterial: ShaderMaterial;
|
|
|
|
|
renderTargetDepthBuffer: WebGLRenderTarget;
|
|
|
|
|
renderTargetMaskDownSampleBuffer: WebGLRenderTarget;
|
|
|
|
|
renderTargetBlurBuffer1: WebGLRenderTarget;
|
|
|
|
|
renderTargetBlurBuffer2: WebGLRenderTarget;
|
|
|
|
|
edgeDetectionMaterial;
|
|
|
|
|
edgeDetectionMaterial: ShaderMaterial;
|
|
|
|
|
renderTargetEdgeBuffer1: WebGLRenderTarget;
|
|
|
|
|
renderTargetEdgeBuffer2: WebGLRenderTarget;
|
|
|
|
|
separableBlurMaterial1: ShaderMaterial;
|
|
|
|
@ -38,8 +38,6 @@ export class OutlinePass extends Pass
|
|
|
|
|
materialCopy: ShaderMaterial;
|
|
|
|
|
oldClearColor: Color;
|
|
|
|
|
oldClearAlpha: number;
|
|
|
|
|
camera: OrthographicCamera;
|
|
|
|
|
scene: Scene;
|
|
|
|
|
fsQuad: Pass.FullScreenQuad;
|
|
|
|
|
tempPulseColor1: Color;
|
|
|
|
|
tempPulseColor2: Color;
|
|
|
|
@ -63,7 +61,6 @@ export class OutlinePass extends Pass
|
|
|
|
|
this.downSampleRatio = 2;
|
|
|
|
|
this.pulsePeriod = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.resolution = (resolution !== undefined) ? new Vector2(resolution.x, resolution.y) : new Vector2(256, 256);
|
|
|
|
|
|
|
|
|
|
var pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };
|
|
|
|
@ -147,12 +144,7 @@ export class OutlinePass extends Pass
|
|
|
|
|
this.oldClearColor = new Color();
|
|
|
|
|
this.oldClearAlpha = 1;
|
|
|
|
|
|
|
|
|
|
this.camera = new OrthographicCamera(- 1, 1, 1, - 1, 0, 1);
|
|
|
|
|
this.scene = new Scene();
|
|
|
|
|
|
|
|
|
|
this.fsQuad = new Pass.FullScreenQuad(null);
|
|
|
|
|
this.fsQuad.frustumCulled = false; // Avoid getting clipped
|
|
|
|
|
this.scene.add(this.fsQuad);
|
|
|
|
|
|
|
|
|
|
this.tempPulseColor1 = new Color();
|
|
|
|
|
this.tempPulseColor2 = new Color();
|
|
|
|
|