How to use Lens Flare

Hey,



I am looking for an example for LensFlare class (http://www.jmonkeyengine.com/doc/com/jmex/effects/LensFlare.html) and how to use it.



I tried to import this:

[java]import com.jmex.effects.LensFlare;

import com.jmex.effects.LensFlareFactory;[/java]



But it doesn´t work, because this package doesn´t exist.

Has anyone an example for the textures?

That was for jME2.



If you want that for jME3, you’ll have to either implement your own, or “fix” the above if you can find the code. (I would think it’s still there somewhere in the repository.)

1 Like

No reason this couldn’t be done as a shader.



Hint: http://mynameismjp.wordpress.com/2009/12/15/more-post-processing-tricks-lens-flare/

This is a tutorial on doing a shader based one. I’ve implemented my own version of it and it works quite nicely… although it’s quite expensive…



http://www.john-chapman.net/content.php?id=18