setSize method

dynamic setSize(
  1. int width,
  2. int height
)

Implementation

setSize(int width, int height) {
  int resx = width ~/ 2;
  int resy = height ~/ 2;

  this.renderTargetBright.setSize(resx, resy);

  for (var i = 0; i < this.nMips; i++) {
    this.renderTargetsHorizontal[i].setSize(resx, resy);
    this.renderTargetsVertical[i].setSize(resx, resy);

    this.separableBlurMaterials[i].uniforms['texSize']["value"] =
        new Vector2(resx.toDouble(), resy.toDouble());

    resx = resx ~/ 2;
    resy = resy ~/ 2;
  }
}