Extend LensFlare constructor for use BABYLON.Texture


Small request.
Please allow use Texture (not only url) in LensFlare conctructor or static AddFlare method.

Now, if we create LF system can get warning:
“[.WebGL-0x2322bd977100]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.”

…because texture loading do not so fast, as scene create and play.

If we set ‘texture’ property of LensFlare object in a already loaded texture, no warnings invokes.

Thank’s! )

I will make sure you can set the texture directly!

Will be fixed in next commit

Thank you!
Yes, i can set texture directly, but just for comfort, beauty and documentation it will be little better for beginners in Babylon as me )

We need to add new parameters to the constructor or change a parameter type so not sure it will help a lot :slight_smile:

Anyway I fixed the issue you found

1 Like

Bless you, Sith Overlord ))