@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
45 lines (38 loc) • 1.33 kB
text/typescript
// /**
// * Creates a bleach effect
// *
// *
// */
// import {TypedPostNode, TypedPostNodeContext, PostParamOptions} from './_Base';
// import {ShaderPass} from 'three/examples/jsm/postprocessing/ShaderPass';
// import {BleachBypassShader} from 'three/examples/jsm/shaders/BleachBypassShader';
// import {IUniformN} from '../utils/code/gl/Uniforms';
// interface BleachPassWithUniforms extends ShaderPass {
// uniforms: {
// opacity: IUniformN;
// };
// }
// import {NodeParamsConfig, ParamConfig} from '../utils/params/ParamsConfig';
// class BleachPostParamsConfig extends NodeParamsConfig {
// /** @param opacity */
// opacity = ParamConfig.FLOAT(0.95, {
// range: [-5, 5],
// rangeLocked: [true, true],
// ...PostParamOptions,
// });
// }
// const ParamsConfig = new BleachPostParamsConfig();
// export class BleachPostNode extends TypedPostNode<ShaderPass, BleachPostParamsConfig> {
// override paramsConfig = ParamsConfig;
// static override type() {
// return 'bleach';
// }
// protected override _createPass(context: TypedPostNodeContext) {
// const pass = new ShaderPass(BleachBypassShader) as BleachPassWithUniforms;
// this.updatePass(pass);
// return pass;
// }
// override updatePass(pass: BleachPassWithUniforms) {
// pass.uniforms.opacity.value = this.pv.opacity;
// }
// }