GlitchPass constructor

GlitchPass(
  1. dynamic dt_size
)

Implementation

GlitchPass(dt_size) : super() {
  if (DigitalGlitch == null) {
    print('THREE.GlitchPass relies on DigitalGlitch');
  }

  var shader = DigitalGlitch;
  this.uniforms = UniformsUtils.clone(shader["uniforms"]);

  if (dt_size == null) dt_size = 64;

  this.uniforms['tDisp']["value"] = this.generateHeightmap(dt_size);

  this.material = new ShaderMaterial({
    "uniforms": this.uniforms,
    "vertexShader": shader["vertexShader"],
    "fragmentShader": shader["fragmentShader"]
  });

  this.fsQuad = new FullScreenQuad(this.material);
  this.generateTrigger();
}