mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
33 lines
665 B
JavaScript
33 lines
665 B
JavaScript
/**
|
|
* @author sunag / http://www.sunag.com.br/
|
|
*/
|
|
|
|
THREE.NodePass = function() {
|
|
|
|
THREE.ShaderPass.call( this );
|
|
|
|
this.textureID = 'renderTexture';
|
|
|
|
this.fragment = new THREE.RawNode( new THREE.ScreenNode() );
|
|
|
|
this.node = new THREE.NodeMaterial();
|
|
this.node.fragment = this.fragment;
|
|
|
|
this.build();
|
|
|
|
};
|
|
|
|
THREE.NodePass.prototype = Object.create( THREE.ShaderPass.prototype );
|
|
THREE.NodePass.prototype.constructor = THREE.NodePass;
|
|
|
|
THREE.NodeMaterial.addShortcuts( THREE.NodePass.prototype, 'fragment', [ 'value' ] );
|
|
|
|
THREE.NodePass.prototype.build = function() {
|
|
|
|
this.node.build();
|
|
|
|
this.uniforms = this.node.uniforms;
|
|
this.material = this.node;
|
|
|
|
};
|