Skip to content

Commit

Permalink
Merge pull request #20117 from WestLangley/dev_examples_stencil
Browse files Browse the repository at this point in the history
Examples: StencilBuffer is disabled by default...
  • Loading branch information
mrdoob authored Aug 18, 2020
2 parents 7712829 + a9a97d0 commit 023c818
Show file tree
Hide file tree
Showing 27 changed files with 20 additions and 49 deletions.
1 change: 0 additions & 1 deletion examples/js/misc/GPUComputationRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ THREE.GPUComputationRenderer = function ( sizeX, sizeY, renderer ) {
magFilter: magFilter,
format: THREE.RGBAFormat,
type: dataType,
stencilBuffer: false,
depthBuffer: false
} );

Expand Down
3 changes: 0 additions & 3 deletions examples/js/misc/Ocean.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ THREE.Ocean = function ( renderer, camera, scene, options ) {
wrapS: THREE.ClampToEdgeWrapping,
wrapT: THREE.ClampToEdgeWrapping,
format: THREE.RGBAFormat,
stencilBuffer: false,
depthBuffer: false,
premultiplyAlpha: false,
type: renderTargetType
Expand All @@ -61,7 +60,6 @@ THREE.Ocean = function ( renderer, camera, scene, options ) {
wrapS: THREE.ClampToEdgeWrapping,
wrapT: THREE.ClampToEdgeWrapping,
format: THREE.RGBAFormat,
stencilBuffer: false,
depthBuffer: false,
premultiplyAlpha: false,
type: renderTargetType
Expand All @@ -72,7 +70,6 @@ THREE.Ocean = function ( renderer, camera, scene, options ) {
wrapS: THREE.RepeatWrapping,
wrapT: THREE.RepeatWrapping,
format: THREE.RGBAFormat,
stencilBuffer: false,
depthBuffer: false,
premultiplyAlpha: false,
type: renderTargetType
Expand Down
3 changes: 1 addition & 2 deletions examples/js/objects/Fire.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ THREE.Fire = function ( geometry, options ) {
var parameters = {
minFilter: THREE.NearestFilter,
magFilter: THREE.NearestFilter,
depthBuffer: false,
stencilBuffer: false
depthBuffer: false
};


Expand Down
3 changes: 1 addition & 2 deletions examples/js/objects/Reflector.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ THREE.Reflector = function ( geometry, options ) {
var parameters = {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
format: THREE.RGBFormat,
stencilBuffer: false
format: THREE.RGBFormat
};

var renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters );
Expand Down
3 changes: 1 addition & 2 deletions examples/js/objects/Refractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ THREE.Refractor = function ( geometry, options ) {
var parameters = {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
format: THREE.RGBFormat,
stencilBuffer: false
format: THREE.RGBFormat
};

var renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters );
Expand Down
3 changes: 1 addition & 2 deletions examples/js/objects/Water.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ THREE.Water = function ( geometry, options ) {
var parameters = {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
format: THREE.RGBFormat,
stencilBuffer: false
format: THREE.RGBFormat
};

var renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters );
Expand Down
3 changes: 1 addition & 2 deletions examples/js/postprocessing/BokehPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ THREE.BokehPass = function ( scene, camera, params ) {

this.renderTargetDepth = new THREE.WebGLRenderTarget( width, height, {
minFilter: THREE.NearestFilter,
magFilter: THREE.NearestFilter,
stencilBuffer: false
magFilter: THREE.NearestFilter
} );

this.renderTargetDepth.texture.name = "BokehPass.depth";
Expand Down
3 changes: 1 addition & 2 deletions examples/js/postprocessing/EffectComposer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ THREE.EffectComposer = function ( renderer, renderTarget ) {
var parameters = {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
format: THREE.RGBAFormat,
stencilBuffer: false
format: THREE.RGBAFormat
};

var size = renderer.getSize( new THREE.Vector2() );
Expand Down
2 changes: 0 additions & 2 deletions examples/js/postprocessing/SMAAPass.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/js/postprocessing/SavePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THREE.SavePass = function ( renderTarget ) {

if ( this.renderTarget === undefined ) {

this.renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false } );
this.renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat } );
this.renderTarget.texture.name = "SavePass.rt";

}
Expand Down
1 change: 0 additions & 1 deletion examples/jsm/misc/GPUComputationRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ var GPUComputationRenderer = function ( sizeX, sizeY, renderer ) {
magFilter: magFilter,
format: RGBAFormat,
type: dataType,
stencilBuffer: false,
depthBuffer: false
} );

Expand Down
3 changes: 0 additions & 3 deletions examples/jsm/misc/Ocean.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ var Ocean = function ( renderer, camera, scene, options ) {
wrapS: ClampToEdgeWrapping,
wrapT: ClampToEdgeWrapping,
format: RGBAFormat,
stencilBuffer: false,
depthBuffer: false,
premultiplyAlpha: false,
type: renderTargetType
Expand All @@ -80,7 +79,6 @@ var Ocean = function ( renderer, camera, scene, options ) {
wrapS: ClampToEdgeWrapping,
wrapT: ClampToEdgeWrapping,
format: RGBAFormat,
stencilBuffer: false,
depthBuffer: false,
premultiplyAlpha: false,
type: renderTargetType
Expand All @@ -91,7 +89,6 @@ var Ocean = function ( renderer, camera, scene, options ) {
wrapS: RepeatWrapping,
wrapT: RepeatWrapping,
format: RGBAFormat,
stencilBuffer: false,
depthBuffer: false,
premultiplyAlpha: false,
type: renderTargetType
Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/nodes/postprocessing/NodePostProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ function NodePostProcessing( renderer, renderTarget ) {
var parameters = {
minFilter: LinearFilter,
magFilter: LinearFilter,
format: RGBAFormat,
stencilBuffer: false
format: RGBAFormat
};

var size = renderer.getDrawingBufferSize( new Vector2() );
Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/objects/Fire.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ var Fire = function ( geometry, options ) {
var parameters = {
minFilter: NearestFilter,
magFilter: NearestFilter,
depthBuffer: false,
stencilBuffer: false
depthBuffer: false
};


Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/objects/Reflector.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ var Reflector = function ( geometry, options ) {
var parameters = {
minFilter: LinearFilter,
magFilter: LinearFilter,
format: RGBFormat,
stencilBuffer: false
format: RGBFormat
};

var renderTarget = new WebGLRenderTarget( textureWidth, textureHeight, parameters );
Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/objects/Refractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ var Refractor = function ( geometry, options ) {
var parameters = {
minFilter: LinearFilter,
magFilter: LinearFilter,
format: RGBFormat,
stencilBuffer: false
format: RGBFormat
};

var renderTarget = new WebGLRenderTarget( textureWidth, textureHeight, parameters );
Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/objects/Water.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ var Water = function ( geometry, options ) {
var parameters = {
minFilter: LinearFilter,
magFilter: LinearFilter,
format: RGBFormat,
stencilBuffer: false
format: RGBFormat
};

var renderTarget = new WebGLRenderTarget( textureWidth, textureHeight, parameters );
Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/postprocessing/BokehPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ var BokehPass = function ( scene, camera, params ) {

this.renderTargetDepth = new WebGLRenderTarget( width, height, {
minFilter: NearestFilter,
magFilter: NearestFilter,
stencilBuffer: false
magFilter: NearestFilter
} );

this.renderTargetDepth.texture.name = "BokehPass.depth";
Expand Down
3 changes: 1 addition & 2 deletions examples/jsm/postprocessing/EffectComposer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ var EffectComposer = function ( renderer, renderTarget ) {
var parameters = {
minFilter: LinearFilter,
magFilter: LinearFilter,
format: RGBAFormat,
stencilBuffer: false
format: RGBAFormat
};

var size = renderer.getSize( new Vector2() );
Expand Down
2 changes: 0 additions & 2 deletions examples/jsm/postprocessing/SMAAPass.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/jsm/postprocessing/SavePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var SavePass = function ( renderTarget ) {

if ( this.renderTarget === undefined ) {

this.renderTarget = new WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBFormat, stencilBuffer: false } );
this.renderTarget = new WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBFormat } );
this.renderTarget.texture.name = "SavePass.rt";

}
Expand Down
5 changes: 2 additions & 3 deletions examples/jsm/utils/RoughnessMipmapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RoughnessMipmapper.prototype = {

if ( _tempTarget != null ) _tempTarget.dispose();

_tempTarget = new WebGLRenderTarget( width, height, { depthBuffer: false, stencilBuffer: false } );
_tempTarget = new WebGLRenderTarget( width, height, { depthBuffer: false } );
_tempTarget.scissorTest = true;

}
Expand All @@ -65,8 +65,7 @@ RoughnessMipmapper.prototype = {

var newRoughnessTarget = new WebGLRenderTarget( width, height, {
minFilter: LinearMipMapLinearFilter,
depthBuffer: false,
stencilBuffer: false
depthBuffer: false
} );
newRoughnessTarget.texture.generateMipmaps = true;
// Setting the render target causes the memory to be allocated.
Expand Down
3 changes: 1 addition & 2 deletions examples/webgl2_multisampled_renderbuffers.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@
//

var parameters = {
format: THREE.RGBFormat,
stencilBuffer: false
format: THREE.RGBFormat
};

var size = renderer.getDrawingBufferSize( new THREE.Vector2() );
Expand Down
1 change: 0 additions & 1 deletion examples/webgl_gpgpu_water.html
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@
magFilter: THREE.NearestFilter,
format: THREE.RGBAFormat,
type: THREE.UnsignedByteType,
stencilBuffer: false,
depthBuffer: false
} );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_postprocessing_crossfade.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
this.mesh = new THREE.Mesh( generateGeometry( type, numObjects ), defaultMaterial );
this.scene.add( this.mesh );

var renderTargetParameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false };
var renderTargetParameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat };
this.fbo = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, renderTargetParameters );

this.render = function ( delta, rtt ) {
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_shaders_tonemapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
// var width = window.innerWidth || 1;
var height = window.innerHeight || 1;

var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat, stencilBuffer: false };
var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat };
var regularRenderTarget = new THREE.WebGLRenderTarget( windowThirdX, height, parameters );
ldrEffectComposer = new EffectComposer( renderer, regularRenderTarget );

Expand Down
1 change: 0 additions & 1 deletion examples/webgl_simple_gi.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
var rt = new THREE.WebGLRenderTarget( SIZE, SIZE, {
wrapS: THREE.ClampToEdgeWrapping,
wrapT: THREE.ClampToEdgeWrapping,
stencilBuffer: false,
depthBuffer: true
} );

Expand Down

0 comments on commit 023c818

Please sign in to comment.