SMAAPass: Texture marked for update but image is incomplete

Description of the problem

When using the SMAAPass, a warning is logged:
THREE.WebGLRenderer: Texture marked for update but image is incomplete
This warning occurs because the Image.complete is false, after setting Image.complete it looks like it is asynchronous.

Please also include a live example if possible. You can start from these templates:

Three.js version
  • Dev
  • [x ] r97
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Author: Fantashit

1 thought on “SMAAPass: Texture marked for update but image is incomplete

  1. That looks like a hack to me. Please consider a more conventional pattern:

    var image = new Image();
    image.src = dataURL;
    
    var texture = new THREE.Texture( image );
    
    image.onload = function () {
        texture.needsUpdate = true;
    };

Comments are closed.