Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are bloom effects possible for Java Graphics2D? If so, how?

I've been attempting to make a 2D space-like game using Java just for the fun of it. I've decided just to use Java's Graphics2D to render my game because I wasn't in the mood to learn LWJGL. However, I just now realized how limited it is. For example, I realized a nice bloom/glow effect would look really nice. However, I can't find anything on Google about doing so with Graphics2D and without using another library.

What bloom effect I'm looking for:
https://gamedev.stackexchange.com/questions/18594/how-can-i-make-this-style-of-2d-glowing-graphics

Bloom information:
http://en.wikipedia.org/wiki/Bloom_%28shader_effect%29

So the main question is, does anyone know of a good method to add a sharp bloom shader effect using Graphics2D?

like image 543
CHess Avatar asked Nov 25 '13 01:11

CHess


1 Answers

There's no bloom effect ready for use available in the Java 2D API, but it is certainly possible to implement one.

  • First, I suggest you investigate how such filters work and for that I recommend taking a look at Jerry's Java Image Processing Pages. There are many filter implementations available on that page for download.

  • There's an interesting discussion about the bloom effect on Java2D Bloom, and they share source code.

  • There's also a nice comparison of a bloom effect implemented in Java and GLSL at Fast Image Processing with JOGL:

like image 92
karlphillip Avatar answered Sep 18 '22 16:09

karlphillip