[EFFECT] Adjust Hue

Share your Construct 2 effect files

Post » Fri Jan 09, 2015 8:48 pm

A simple effect to adjust the hue of a image.

Using the code from here:
http://gamedev.stackexchange.com/questi ... brightness

Why not use the HSL shader that comes with C2?
My graphics card can't handle that shader.
You do not have the required permissions to view the files attached to this post.
B
92
S
32
G
110
Posts: 5,295
Reputation: 71,501

Post » Sat Jan 10, 2015 1:10 am

Awesome, thanks! The GLSL shaders that come with C2 are a little hit and miss, it's great to have alternatives.

@Somebody

I think R0J0hound might have just helped you out of your issue with the HSL effect. ;)
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Jan 10, 2015 7:23 am

He actually messaged me right away about this being in response to that post, which is amazing. Unfortunately on my system all it does is make the object disappear. It also lacks the Saturation and Luminance elements, but knowing R0J0 is on it I'm sure excellent results are somewhere around the corner.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sun Jan 11, 2015 11:09 am

I have been doing some research and - could this be helpful with making an efficient and correct version?

http://www.chilliant.com/rgb2hsv.html
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sun Feb 08, 2015 12:51 am

What kind of graphics card are you using? The shader feels like it should be very simple for any today's graphics card.
B
21
S
7
G
4
Posts: 233
Reputation: 3,474

Post » Sun Feb 08, 2015 6:48 am

I managed to work around it by making (or rather borrowing and adapting) my own Hsb shader (in signature).
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Thu Feb 19, 2015 10:45 am

Same effect but better performances ? Hey r0j0, do you want to make a similar version with the brightness parameter ? :D
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Thu Feb 19, 2015 11:16 am

Coin-coin le Canapin wrote:Same effect but better performances ? Hey r0j0, do you want to make a similar version with the brightness parameter ? :D


I know what you want this for, Coin, but you should really try having a single "things getting hit" layer and throw objects in and out of it. I can make a shader with the only function of making things white and no parameters so it would be as fast as possible, but that still won't be too fast with many objects I suspect.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Thu Feb 19, 2015 11:35 am

I've made a somewhat particle effects that throws about 50 sprites. I wanted each of them having a random brightness between 80 and 100.
Because the brigthness shader was too slow, I instead made 5 frames of the same sprite which I changed its colors to have a similar effect to 80, 90, 100, 110, 120 brightness.
When a sprite spawns, it uses a random frame between these.

It works well. I liked the layer idea and I thought about using it, but I don't really want to have about 5 layers only for this. :)
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Thu Feb 19, 2015 11:43 am

Sounds like a good workaround to me, especially if more parameters, like hue, etc come into play.

Shaders were really quick in construct classic, but for some reason on browsers they lack that speed.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Next

Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests