Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new render target types for 3D and array textures.
- Loading branch information
Showing
11 changed files
with
59 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { WebGLRenderTarget } from './WebGLRenderTarget.js'; | ||
import { DataTexture2DArray } from '../textures/DataTexture2DArray.js'; | ||
|
||
class WebGL2DArrayRenderTarget extends WebGLRenderTarget { | ||
|
||
constructor( width, height, depth, options = {} ) { | ||
|
||
super( width, height, options ); | ||
|
||
this.depth = depth; | ||
|
||
this.texture = new DataTexture2DArray( null, width, height, depth, options.format, options.type, options.mapping, options.wrapS, options.wrapT, options.wrapR, options.magFilter, options.minFilter, options.anisotropy, options.encoding ); | ||
this.texture.isRenderTargetTexture = true; | ||
|
||
} | ||
|
||
} | ||
|
||
WebGL2DArrayRenderTarget.prototype.isWebGL2DArrayRenderTarget = true; | ||
|
||
export { WebGL2DArrayRenderTarget }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { WebGLRenderTarget } from './WebGLRenderTarget.js'; | ||
import { DataTexture3D } from '../textures/DataTexture3D.js'; | ||
|
||
class WebGL3DRenderTarget extends WebGLRenderTarget { | ||
|
||
constructor( width, height, depth, options = {} ) { | ||
|
||
super( width, height, options ); | ||
|
||
this.depth = depth; | ||
|
||
this.texture = new DataTexture3D( null, width, height, depth, options.format, options.type, options.mapping, options.wrapS, options.wrapT, options.wrapR, options.magFilter, options.minFilter, options.anisotropy, options.encoding ); | ||
this.texture.isRenderTargetTexture = true; | ||
|
||
} | ||
|
||
} | ||
|
||
WebGL3DRenderTarget.prototype.isWebGL3DRenderTarget = true; | ||
|
||
export { WebGL3DRenderTarget }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters