Hue Shader

This forum is currently in read-only mode.
0 favourites
  • Because of this topic, I decided I would take a crack at making a hue shader. Well, it took me a little time, but I actually managed to do it. It doesn't allow you to alter the saturation or lightness, but it does allow you to change the hue. Here it is(with example CAP):

    Hue Shader(with example)

    Let me know what you think. Also, any chance this could be included in the next Construct build?

  • awesome thanks

  • Doesn't appear to do anything for me...?

  • Looks like it's working fine on my end. The actions seemed to be missing a "Sprite: Hue Tint: Set Hue to global('hue')" action.

    Also, linkman... just a heads up but the description for your effect reads "Additive blend with intensity."

  • Also, there is a crash when you double-click the Set Hue event and then hit "Back" in the wizard.

  • No problem, dfyb.

    deadeye

    Crap, I used the additive shader as a template and I forgot to change the description. The download link now points to a version where that's fixed.

    Mipey

    How is it not working? Hue doesn't effect grayscale images, if that's what you're trying to do. Also, the crash is due to Construct only. It's like that for all effects.

    EDIT: I fixed it up to where the entire image isn't colored the same way. Each pixel's hue now changes based on what color they are originally. Download from the top, or HERE.

  • EDIT: I fixed it up to where the entire image isn't colored the same way. Each pixel's hue now changes based on what color they are originally.

    Hot damn, that's quite nice

    But maybe you should make a second shader that does it the old way as well, and call it "Monochrome Hue" or something like that

  • Excellent work mate.

    Love it!

    I also agree that it would be nice to have one that does it the original way too.

    Very nice.

    Sponge.

  • Very nice indeed .

  • Okay, so I put the Hue Tint.fx into Effects folder, run the .cap - the sprite colors aren't changing at all. Must be my PC or something, I don't know :s

  • Okay, so I put the Hue Tint.fx into Effects folder, run the .cap - the sprite colors aren't changing at all. Must be my PC or something, I don't know :s

    Hmm... I'd suggest checking the events in the CAP file. If there's nothing setting the hue, that's probably the problem.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The event is there; unless your example .cap is corrupted. But since it seems to work for everyone else, I have no clue what is wrong on my side.

  • Must be a shader thing, doesn't work in mine either (Radeon 9600xt)

  • It looks like neither of you two's video cards support PS 2.0a. I couldn't use regular 2.0 because it didn't support enough math operations to do the RGB-HSL-RGB conversions. Sorry. You would need a GeForce FX or higher graphics card. If I can find a simpler way to do the conversions, I'll update the shader.

  • I managed to make a work around for those with cards that only support regular PS 2.0, but it uses two shaders instead of one. The first one, "TPHUE Convert" converts the RGB values of an image into HSL, then the second one, "TPHUE Change Hue" changes the hue and converts the values back to RGB. They HAVE to be in the order specified, otherwise you'll get some funky results.

    Two Part Hue Shader

    NOTE: Only use this shader if you're card doesn't support PS 2.0a. If it does, use the already linked to shader.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)