Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - laserhosen

Pages: 1 2
What are the chances a shader could be made that desaturates the screen but can exclude certain colors/color ranges?

Here's a quick and dirty photoshop example of what I'd like to be able to do -- I'd like to be able to turn down the saturation but exempt the pink/purple color range. top screenshot would be off, bottom screenshot would be with a lot of desaturation

How doable would this be?

This should be doable. It seems pretty straight forward. I can look into it later this week.

@laserhosen: I can't see the effect!

Are you testing with Flash, HTML, or mobile? Shaders are for desktop only, so they only work with Windows or Mac apps.

@twotimingpete @LIBERADO I've looked into more realistic motion blur shaders and I think it's a bit beyond my abilities at the moment.

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!

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

Ask a Question / Re: Provisioning Profile Problem
« on: October 16, 2016, 10:30:57 pm »
I was having this issue as well when I tried to test on device. It seemed that it wasn't generating the necessary iOS Team Provisioning Profile. If you go to Xcode > Preferences > Accounts > View Details there should be a Provisioning Profile that reads something like "iOS Team Provisioning Profile: com.whatever.yourgamename." If that's not there that could be the issue. The way I got around this was by exporting it as an Xcode project and then attempting to run in Xcode. It didn't run in Xcode but it did it generate the Team Profile, and I was able to test to device via Stencyl with no problem.

I was having this issue too when trying to test on device. It turns out it wasn't creating the necessary iOS Team Provisioning Profile. The work around that helped me was to export the game as an Xcode project, then run it in Xcode. The iOS Team Provioning Profile appears after doing so. Then I was able to test it on device via Stencyl.

I will note that when I went to export to an Xcode project via Stencyl it gave a warning about needing a certain Haxe installed (even though it was), but it still let me export it. Then it failed to run in Xcode, but it did generate the Team Provisioning Profile that I needed to get it running on device with Stencyl.

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.

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.

Here's a Gameboy Color Palette shader. It limits the color palette to 4 user definable colors based on the original color's intensity. The RGB values of the 4 colors can be modified to create your own 4 color palette!

Shared Resources / Re: Shaders! Shaders galore! Shaders for all! (gif heavy)
« on: September 25, 2016, 06:17:05 pm »
I had to rewrite the shockwave shader to work with Mac, but I was able to get it working on both Windows and Mac now. I noticed the radial blur shader is not working on Mac either so I'll have to look into that.  I'll repackage all of the shaders as well as a couple of new ones in the next few days and update the top post, but in the meantime you can get the shockwave shader attached to this post!

Shared Resources / Re: Shaders! Shaders galore! Shaders for all! (gif heavy)
« on: September 22, 2016, 11:11:54 am »
Haven't had a chance to look into it yet but I'll give it a go this weekend. Hopefully I can figure out the issue!

Shared Resources / Re: Shaders! Shaders galore! Shaders for all! (gif heavy)
« on: September 12, 2016, 06:28:27 pm »
Very cool! All of the shaders are working on Mac except the shockwave one (which is the coolest looking one, hahaha)

Hmmm that's odd. I'll have to give it a look on my Mac later. I may be wrong but it sounds like the shader has to explicitly cast float, vec2, etc for Mac.

For instance, lines like:
Code: [Select]
vec2 uv = vTexCoord;...should be:
Code: [Select]
vec2 uv = vec2(vTexCoord);Shockwave is my favorite too, and one of the main reasons I started learning shaders! I'll try to get it working within the next day or two, along with a slew of other shaders that I'll be releasing too!

Shared Resources / Re: Shaders! Shaders galore! Shaders for all! (gif heavy)
« on: September 11, 2016, 12:03:33 am »
Attached is another shader that emulates how an old CRT monitor would look.

Press up and down to adjust the distortion amount, Z to toggle the distortion on and off, X to toggle the border on and off, and Enter to toggle the shader on and off.

Shared Resources / Re: Shaders! Shaders galore! Shaders for all! (gif heavy)
« on: September 10, 2016, 05:21:48 pm »
Thanks Hectate and Alessandro!

Seems amazing, thank you for sharing! :)
This works only on windows or also on flash/ios/android?
What about FPS in those last platforms?

As per the Stencylpedia article on shaders "Supported Platforms: Windows, Mac and Linux. Shaders are not supported on Flash or iOS. They work to a limited extent on Android."

I've only tested these on Windows but they should work on Mac and Linux just fine. I don't have an Android device so I couldn't tell you how they perform there.

Shared Resources / Shaders! Shaders galore! Shaders for all! (gif heavy)
« on: September 10, 2016, 03:29:27 pm »
I've been learning how to work with shaders recently and thought I'd share what I've been able to do so far. Shaders are still a bit of a black magic mystery to me, but I've learned enough to be able to port a few common shaders. I've included a .stencyl file so that you all can play around with them, alter, use them in your games, etc. I've only tested them on my PC, but they all run 60 fps for me!

First up is the Shockwave Shader! Clicking on the screen creates a shockwave. Customizable amplitude, refraction, and width.

Next is the Magnify Shader. This is just an adapted version of the Stencylpedia magnify shader that uses your mouse location to draw the magnification. Adjustable circle radius, minimum zoom, and maximum zoom.

Next, the Radial Blur Shader. This creates a radial blur that gets blurrier the further away from the mouse.

Also include are 6 other shaders. These include in clockwise order starting from the top left:
Posterization Shader. Limits the amount of colors drawn to screen. Customizable number of colors.
LED Shader. Gives the screen an LED look. Customizable LED size and LED brightness. Most numbers look odd!
Sketch Shader. Gives the game a black and white sketched look. Customizable intensity.
Thermal Shader This converts colors to give a thermal imaging appearance. Lighter colors get converted to red, oranges, yellows and darker colors get converted to greens, blues and purples.
Emboss Shader. Gives an embossed appearance to the entire screen.
Pixelate Shader. Creates a pixel effect. Customizable pixel amount.

I'll be adding more shaders as I go. I currently have a chromatic abberation, a vignetting, a tilt shift, a  glitter, a CRT effect, and a Gameboy-esque pallette swap shader in the works that I'll have finished soon.

Pages: 1 2