[EFFECT] Scanlines

Completed plugins, behaviors and effects.

Post » Sun Jan 31, 2010 9:13 pm

I was reading this
[url:rt207fkm]http://www.scirra.com/forum/viewtopic.php?f=7&t=5641&start=0[/url:rt207fkm]

And did some testing and wound up with a fully fledged scanline effect.

Woops.

EDIT:
Parameters:
number of shown scanlines
width of scanlines (as coverage %)
intensity of the effect (0% intensity is invisible, 100% means black lines)

There's no offset control because I didn't feel it would be useful.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Feb 01, 2010 12:57 pm

Nice one!
Just one thing: If you want the scanlines to stay with the sprite, when a sprite with this effect moves, you should use boxTop like so:

[code:1d2q3v7p]float darken = 2*abs((((Tex.y - boxTop)*tot) %1)-0.5);[/code:1d2q3v7p]

Thank you for this one, will play around with the code :wink:
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Feb 02, 2010 9:30 pm

yeah I left it out in purpose, since I figured if your scanlines are moving with your art you might as well bake it in (and no rotating, as the boxTop is the bounding box, the offset would go nuts anyway).

This effect is already used in a game I have almost finished and it looks pretty good :)
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Tue Feb 02, 2010 11:52 pm

Great FX! Just what I needed for my game :D
B
33
S
15
G
6
Posts: 242
Reputation: 4,343

Post » Fri Jul 01, 2011 11:25 pm

could someone pleas post this effect, or i just can't find the link?
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Fri Jul 01, 2011 11:43 pm

Link to old threadTom2011-07-01 23:44:04
Image Image
Scirra Founder
B
125
S
37
G
25
Posts: 3,945
Reputation: 44,922

Post » Fri Jul 01, 2011 11:45 pm

thanks Tom!
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170


Return to Completed addons

Who is online

Users browsing this forum: No registered users and 0 guests