Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/js/postprocessing/SAOPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ THREE.SAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
var oldAutoClear = renderer.autoClear;
renderer.autoClear = false;

renderer.clearTarget( this.depthRenderTarget );
renderer.setRenderTarget( this.depthRenderTarget );
renderer.clear();

this.saoMaterial.uniforms[ 'bias' ].value = this.params.saoBias;
this.saoMaterial.uniforms[ 'intensity' ].value = this.params.saoIntensity;
Expand Down
3 changes: 2 additions & 1 deletion examples/webgl_postprocessing_godrays.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@

// Clear colors and depths, will clear to sky color

renderer.clearTarget( postprocessing.rtTextureColors, true, true, false );
renderer.setRenderTarget( postprocessing.rtTextureColors );
renderer.clear( true, true, false );

// Sun render. Runs a shader that gives a brightness based on the screen
// space distance to the sun. Not very efficient, so i make a scissor
Expand Down
8 changes: 8 additions & 0 deletions src/Three.Legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,14 @@ Object.defineProperties( ShaderMaterial.prototype, {

Object.assign( WebGLRenderer.prototype, {

clearTarget: function ( renderTarget, color, depth, stencil ) {

console.warn( 'THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.' );
this.setRenderTarget( renderTarget );
this.clear( color, depth, stencil );

},

animate: function ( callback ) {

console.warn( 'THREE.WebGLRenderer: .animate() is now .setAnimationLoop().' );
Expand Down
7 changes: 0 additions & 7 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,6 @@ function WebGLRenderer( parameters ) {

};

this.clearTarget = function ( renderTarget, color, depth, stencil ) {

this.setRenderTarget( renderTarget );
this.clear( color, depth, stencil );

};

//

this.dispose = function () {
Expand Down