Page 2 of 3

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 7:41 pm
by tentus
kikito wrote:
tentus wrote:Keep in mind this is being used in my Raycasting engine and I'd have to apply this effect to every single quad and sprite being drawn on screen
Then my solution clearly doesn't work for you. My assumption was that you would be able to precalculate the colorized versions in advance.
Wow, I'm on a nitpick run, but... I'm pretty sure Jasoco said that, not me.

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 7:41 pm
by bmelts
Coming soon to an 0.8.0 near you.
lBmXe.png
lBmXe.png (56.66 KiB) Viewed 2087 times

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 7:48 pm
by coffee
anjo wrote:Coming soon to an 0.8.0 near you.
Oh that's sweet Anjo, LOVE core support. If I didn't saw a OSX window I would say you wanted to say "Coming soon to an 0.8.0 PC near you." ;D
What blending modes you planning introduce?

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 7:52 pm
by Kadoba
Jasoco wrote:Right now I can darken an image. But that's it. It makes it work with depth in dark areas, but what about white fog or really cool lighting effects. Green for slime. Red for fire or hot areas. Make it fade between red and black for alarms. Shame.
If you need everything on the screen to be one uniform color couldn't you just draw a semi-transparent rectangle over everything?

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 7:58 pm
by coffee
Kadoba wrote:
Jasoco wrote:Right now I can darken an image. But that's it. It makes it work with depth in dark areas, but what about white fog or really cool lighting effects. Green for slime. Red for fire or hot areas. Make it fade between red and black for alarms. Shame.
If you need everything on the screen to be one uniform color couldn't you just draw a semi-transparent rectangle over everything?
I do something like that to colorize a large amount of fast moving grey & color rectangles . But isn't very color accurate.

EDITED: Your concept applied here Kadoba. In the first screen with a huge red rectangle over gray. In second only with GUI layer rectangle over misc colored tiles.
2.png
3.png

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 8:23 pm
by slime
The new blend mode, as a shader:

Code: Select all

vec4 effect(vec4 color, Image texture, vec2 texture_coord, vec2 pixel_coord)
{
	vec4 texcolor = Texel(texture, texture_coord);
	vec4 result = vec4(texcolor.rgb + color.rgb - 0.5, texcolor.a);
	return clamp(result, 0.0, 1.0);
}

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 8:32 pm
by Jasoco
anjo wrote:Coming soon to an 0.8.0 near you.
Image
Oh joyous day!

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 8:43 pm
by coffee
Jasoco wrote:Oh joyous day!
Didn't you noticed the photoshop fingerprint? ;)

Re: Colorizing an image?

Posted: Thu Jan 26, 2012 11:47 pm
by Jasoco
coffee wrote:
Jasoco wrote:Oh joyous day!
Didn't you noticed the photoshop fingerprint? ;)
Oh shitty day then. Don't get my hopes up. This should be built-in.

Re: Colorizing an image?

Posted: Fri Jan 27, 2012 2:05 am
by bmelts
Jasoco wrote:
coffee wrote:
Jasoco wrote:Oh joyous day!
Didn't you noticed the photoshop fingerprint? ;)
Oh shitty day then. Don't get my hopes up. This should be built-in.
coffee's trolling. It is built in. You can check the commit yourself.