intensity on blur and blurmask effects

New releases and general discussions.

Post » Tue Jan 20, 2009 7:33 pm

title self explanatory :)
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Jan 20, 2009 9:44 pm

I modified the two regular blur shaders to take a floating point value(.1, .2, .3, etc...) for the blur intensity. Default is 1. Anything higher than that start to look pixelated, so 2 is the highest I'd go.

Modified Blur Shaders (Edit by Ashley: please rename these files before copying them in to your Construct folder - don't overwrite the originals - to avoid compatibility problems)

The blur mask shaders already support intensity. The intensity is based off the lightness of the sprite. A completely white sprite is the highest blur intensity, gray in the middle, and black is no blur at all.
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Tue Jan 20, 2009 9:54 pm

Please, if you modify shaders, call them something different, or we'll end up with horrible compatibility issues (it'll probably crash if you make an event setting an effect parameter, and send it to someone with the non-modified shader).

The problem with that modification is blur intensities less than 1 waste processing time, because more samples than necessary to achieve the effect are made. Above it and yes, you get weird aliasing errors. That's why there's been no blur intensity built in. It's possible to do a cheap, quick blur, which is *much* faster than the blur shaders (atm theyre the slowest shaders), but I need to make runtime modifications to make it possible.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Jan 21, 2009 2:11 pm

thanks linkman!
I forgot I even posted this thread
I'll make sure to rename them ashley
btw, on the blurmask I know about the white to black to affect intensity
I just was wondering if it's possible to make the white be a higher maximum bluriness amount
I tried using blurmask twice on the same object, but then it's blurry even if theres black or alpha 0 there
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests