GlitchPass constructor

GlitchPass(
  1. dynamic dtSize
)

Implementation

GlitchPass(dtSize) : super() {
  var shader = digitalGlitch;
  uniforms = UniformsUtils.clone(shader["uniforms"]);

  dtSize ??= 64;

  uniforms['tDisp']["value"] = generateHeightmap(dtSize);

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

  fsQuad = FullScreenQuad(material);
  generateTrigger();
}