LensFlareSystem

Снимок экрана от 2024-06-08 21-03-42

I’m trying to create a highlight, but the image is not what I expected. The first screen is an image through the img tag (red background for clarity), the second screen is what I get through the following code

  var lensFlareSystem = new LensFlareSystem(
      'lensFlareSystem',
      this.scene.getMeshByName('meshName'),
      this.scene
    );

     new LensFlare(
      1,
      0,
      new Color3(1, 1, 1),
      'assets/lens7.png',
      lensFlareSystem
    );

what am I doing wrong? Thanks in advance for your answers

Hey! Can you share a repro through the playground? This would help solving the issue

2 Likes

100% Agree. A playground will be the only way we can help here. We have no understanding of the scene, the camera system, what is “meshName” and so on.

I solved the problem, all I had to do was add alphaMode = 1 to LensFlare;\

2 Likes