Stencyl 3.4.0 is now out. Get it now!

Shaders! Shaders galore! Shaders for all! (gif heavy)

laserhosen

  • *
  • Posts: 21
Have you found a way to load a normal map or other textures into a shader?

I haven't looked into it yet but that's something on my to do list because I would like to work with shaders that use other textures.

laserhosen

  • *
  • Posts: 21
Here's the next batch of shaders:

Tilt Shift: Blurs the top and bottom of the screen to give the appearance of depth of field.


Glitter: Makes light colors glow with an X-like pattern.


Volume Lighting: Casts a glow from center of screen on dark pixels.


Edge Fringe: Creates a chromatic aberration on the left and right edges of the screen. The severity changes as the pixels get farther away from the center of the screen.


New Bloom: An alternative bloom to the one provided with Stencyl. Maybe a little easier to use.


Bad TV: Creates a faulty CRT TV effect.


Also included is a simple chromatic aberration shader.

The shaders are attached. Press Space to toggle the shader on or off. Press Enter to change the shader. I did not make the shader variables adjustable in real time with these like in the last batch, but you can edit the variables (if available) in the behavior tab of each scene.

« Last Edit: October 02, 2016, 08:21:24 pm by laserhosen »

airman4

  • Posts: 828
that so awesome
thanks a million
too bad it doesnt work on flash
maybe on html5 ?

bonzero

  • *
  • Posts: 464
amazing, the tilt shift is awesome

methodandred

  • Posts: 3
so like, you're sharing these here: i'm working on a game i plan to sell, and a few of these really interest me.

they're being shared publicly so i'm just naturally assuming you don't want money, or would you want some kind of licensing thing if i used some of these? or are these royalty free/free to use with attribution?

i really, really, really like what you've done  here, regardless, great work

laserhosen

  • *
  • Posts: 21
You're free to do with them what you like, no licensing fees or attribution necessary. Do with them as you please.

methodandred

  • Posts: 3
awesome, thanks, good to know!

twotimingpete

  • *
  • Posts: 1666
Is a motion blur effect achievable?

It seems to me it could be applied to the whole screen. All that needs to happen is the shader needs to take an image of the previous frame(s) and blend it with the current one.

This would be a tremendously useful effect and one that I want very much but lack the skillset to create.

twotimingpete

  • *
  • Posts: 1666
I found a use for the badTV effect in my game. I took away the screen rolling part and found it was useful for some damaging type screen effects.

Thank you :)

example: http://i.imgur.com/kdNVip1.gifv

laserhosen

  • *
  • Posts: 21
Is a motion blur effect achievable?

I threw a little motion blur shader together tonight to give it a try. Not entirely sure what you're going for, but I made it blur in the negated direction of movement of the player (angular velocity) at an amount (amplitude) based on the player's velocity.  It could probably be cleaned up a bit, optimized, and made to transition into the blur a little smoother, but let me know if that's on the right track for what you want.

I found a use for the badTV effect in my game. I took away the screen rolling part and found it was useful for some damaging type screen effects.

Thank you :)

That's great! Glad to see these going to use, especially on such a great and inspiring project such as Ghost Song!

twotimingpete

  • *
  • Posts: 1666
oh it's pretty cool! blurring the hud is always a problem, though, and it makes some shaders not desirable.

here's what I've been thinking -- a strictly traditional motion blur shader would somehow blend the current frame with the previous frame (or multiple frames?). This would mean that the more something moves (changes) the more it appears to blur, as we see in film. If it worked like this, we'd have an authentic effect and it wouldn't impact the hud because the hud does not move relative to the screen. If we do it in another way then the hud is blurred out and it's not really workable.

We'd also have individual elements on the screen appearing to blur some more than others just depending on how much they're moving, which is really cool.

I know shaders exist that work this way I'm just not sure if they can be achieved within stencyl or not. My knowledge of how shaders are written is very limited.

« Last Edit: December 29, 2016, 07:14:07 pm by twotimingpete »

LIBERADO

  • *
  • Posts: 2340
blurring the hud is always a problem, though, and it makes some shaders not desirable.
What about this block?:
   
We'd also have individual elements on the screen appearing to blur some more than others just depending on how much they're moving, which is really cool.
I too would like to have a shader to get this realistic motion blur effect. It would be awesome.

« Last Edit: December 29, 2016, 07:42:28 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

twotimingpete

  • *
  • Posts: 1666
I've been tinkering with badtv a bit more. It has a nice disruptive screen effect which is in theme with the game so I've tried using it in different disruptive situations.

I may have gone a bit overboard because it's a new toy but it can always be tweaked. :)

ghost run: http://i.imgur.com/szoyiRU.gifv
charge blast: http://i.imgur.com/mY3OyAp.gifv


What about this block?:
   

Aaaand you just changed my life. I didn't know this was a thing. Hahaha. It produces a couple complications because I use a subtle overlay that was also figured into the shaders, but I should be able to compensate for it/live with it. There may be a couple other issues with menus and stuff but probably nothing that can't be overcome.

twotimingpete

  • *
  • Posts: 1666
I took the motion blur shader and set it up to increase with the camera speed just to see what it'd look like.

http://i.imgur.com/WskVtfZ.gifv  I exaggerated the effect so it'd be easier to see in the gif

It's a neat effect but not too useful as long as it's blurring everything equally. The character, for example, blurring when it's not moving relative to the screen is a deal breaker.

LIBERADO

  • *
  • Posts: 2340
@twotimingpete, to get the shader that we want, the motion blur effect should only ocurr when objects are moving relative to the camera instead of when the camera is moving.

It would be possible by blending the current camera frame with multiple previous camera frames, as you described in another post.

« Last Edit: December 30, 2016, 10:04:45 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.