ab = new CLensFlareSceneNode(smgr->getRootSceneNode(),smgr,666,core::vector3df(0,0,0));
// ab->setMaterialTexture(0, driver->getTexture("flares.jpg"));
ab->getMaterial(1).Textures[0] = driver->getTexture("flares.jpg");
It's TGM's radial blur shader:) Plus some bloom. The radial blur works perfectly for 'high velocity movement' effect. I'll post more screenies after I implement a bit more features.
it is ok, but it`s specific for texture provided with source.
Anyway, shouldn`t this value be evaluated just once - not once per render wasting processor time?
To get some things clear: I didn't create the algorithm used in this node (as stated earlier, I've found the source on the forum), it's merely a rewrite in order to get this working with irr1.3.1. I didn't change 'the vital parts' of the code, simply because I hadn't any problems with it (tested on a couple of systems without errors).
As for the texture problems: the node seems to be working fine with a specific texture pattern. For example if you want a flare with 5 elements, you'd need a texture with all the elements for it. Now given an element size of 128x128 pixels, the texture would have the size of (5*128)X128 pixels. The algorithm used here simply cuts the bigger tex into smaller parts based on the original height of the texture, that's all.
Oh before I forget: I remember seeing a similar lens flare node code on the forum, but that one used a texture array instead of a single tex.
Hope this helps:)
EDIT: You guys using intel videocards? I ran the code on an laptop with an integrated intel GPU and there seem to be problems with textures - the card seems not to render textures bigger than 1024x1024 properly with irrlicht + opengl.
The texture size limitation is vendor driver specific (or even a hardware limitation), so it's basically just to be recognized by Irrlicht somehow. I'd have thought that the texture is not loaded at all.
Using a texture array is not as good as a larger texture, from the performance aspects, but of course it would be better in case of problems with the old code