Filtered Image Effects in Slick?

Hey guys,

I was wondering… does Slick have any libraries for adding effects to images along the lines of drop shadow or glow?

I used pulpcore prior to slick, and pulpcore had something along the lines of:


// -- creates a default glow and default drop shadow, and adds effects to image i.
Glow g = new Glow();
DropShadow s = new DropShadow();
FilterChain f = new FilterChain(g,s);
Image i = new Image("someimage.png",x,y);
i.setFilter(f);

Thanks,

-Pickle :slight_smile:

Nope, it doesn’t.

Your best bet is to bake the glow into textures.

If you really need dynamic glows, you should look into shaders. Slick includes some features for shaders, and you can find examples in the wiki and in the forums.

However, I’d suggest learning shaders with a proper framework rather than hacking things in Slick. See here:

This makes me a saaaad panda.

Oh well, thanks for getting back to me! It saved me quite a bit of time searching :slight_smile:

-Pickle

Shaders aren’t really that hard to learn… :slight_smile:

shaders don’t look too hard to learn :slight_smile:

One other question though… if I make a .png in photoshop and there’s semi-transparent pixels, they show up as white pixels in the game… is there a way to have those transparent pixels appear as transparent pixels, and not as white pixels?

Thanks again,

-Pickle

Did you save the alpha channel with the PNG? Photoshop has some funny defaults about that sort of thing.

I’m not sure even how to check if I did. I’ll look into it though…

Thanks Sproingie :slight_smile:

-Pickle

Yup, it was because I was saving the image as png 8 (which reduced the file size) and as such didn’t save the alpha values :slight_smile:

Thanks again Sproingie! You saved me a ton of time :smiley:

-Pickle