Files
three.js/src/renderers/WebGLRenderTarget.js
T
Mikael Emtinger 08642c5239 Merged with mrdoob.
Added depthBuffer/stencilBuffer flags to WebGLRenderTarget and support for that in WebGLRenderer. Done to support stencil shadows in renderTarget. For some reason { depthBuffer:false, stencilBuffer:true } doesn't work so this is deafulted to both:false.
2011-04-02 11:40:03 +02:00

25 lines
906 B
JavaScript

/**
* @author szimek / https://github.com/szimek/
*/
THREE.WebGLRenderTarget = function ( width, height, options ) {
this.width = width;
this.height = height;
options = options || {};
this.wrapS = options.wrapS !== undefined ? options.wrapS : THREE.ClampToEdgeWrapping;
this.wrapT = options.wrapT !== undefined ? options.wrapT : THREE.ClampToEdgeWrapping;
this.magFilter = options.magFilter !== undefined ? options.magFilter : THREE.LinearFilter;
this.minFilter = options.minFilter !== undefined ? options.minFilter : THREE.LinearMipMapLinearFilter;
this.format = options.format !== undefined ? options.format : THREE.RGBFormat;
this.type = options.type !== undefined ? options.type : THREE.UnsignedByteType;
this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
};