mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-11 05:55:56 +10:00
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.
25 lines
906 B
JavaScript
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;
|
|
|
|
};
|