2
0

WebGLMultisampleRenderTarget.js 844 B

123456789101112131415161718192021222324252627282930313233
  1. import { WebGLRenderTarget } from './WebGLRenderTarget.js';
  2. class WebGLMultisampleRenderTarget extends WebGLRenderTarget {
  3. constructor( width, height, options = {} ) {
  4. super( width, height, options );
  5. this.samples = 4;
  6. this.ignoreDepthForMultisampleCopy = options.ignoreDepth !== undefined ? options.ignoreDepth : true;
  7. this.useRenderToTexture = ( options.useRenderToTexture !== undefined ) ? options.useRenderToTexture : false;
  8. this.useRenderbuffer = this.useRenderToTexture === false;
  9. }
  10. copy( source ) {
  11. super.copy.call( this, source );
  12. this.samples = source.samples;
  13. this.useRenderToTexture = source.useRenderToTexture;
  14. this.useRenderbuffer = source.useRenderbuffer;
  15. return this;
  16. }
  17. }
  18. WebGLMultisampleRenderTarget.prototype.isWebGLMultisampleRenderTarget = true;
  19. export { WebGLMultisampleRenderTarget };