lut property

dynamic get lut

Implementation

get lut {
  return this.material.uniforms["lut"]["value"] ??
      this.material.uniforms["lut3d"]["value"];
}
set lut (dynamic v)

Implementation

set lut(v) {
  var material = this.material;

  if (v != this.lut) {
    material.uniforms["lut3d"]["value"] = null;
    material.uniforms["lut"]["value"] = null;

    if (v != null) {
      var is3dTextureDefine = v is Data3DTexture ? 1 : 0;
      if (is3dTextureDefine != material.defines!["USE_3DTEXTURE"]) {
        material.defines!["USE_3DTEXTURE"] = is3dTextureDefine;
        material.needsUpdate = true;
      }

      if (v is Data3DTexture) {
        material.uniforms["lut3d"]["value"] = v;
      } else {
        material.uniforms["lut"]["value"] = v;
        material.uniforms["lutSize"]["value"] = v.image.width;
      }
    }
  }
}