[Suggestions] Color Replace Shader & GetRGB

0 favourites
  • 6 posts
From the Asset Store
HSV RGB Color Picker and Converter for Construct 3
  • So the 74 shaders we got in r100 are totally awesome and so forth (no, really, I've been messing with them for like 2 hours straight ^^;) but there is no color replace shader as seen in CC. There were 6 paramaters; old RGB and new RGB. It was perfect for changing certain colors on a sprite, and palette shifting (think NES Megaman / NES Megaman charging).

    Is anyone else in need of / willing to write such a shader?

    (To my knowledge "set color" is the closest effect so far, but it affects the entire sprite. Cloning the sprite numerous times, erasing 1 color each, stacking them, and applying the set color effect seems to be the only option right now, but that's pretty inefficient.)

    Also, the Image Manipulator object in CC allowed you to retrieve the RGB value of a point on an image. Like if the color was solid blue on the x,y coordinates (5,10) it would return 0,0,255. It was great for using actual palette images instead of entering the RGB values by hand. Is that possible in C2? I haven't really kept up with the 3rd party plugins so..

  • Ah yeah, I used that for my Mario World clone when you transform into Fire Mario. Very useful for pixel games. I don't have a need for one anymore, but the idea's got my support at least! <img src="smileys/smiley20.gif" border="0" align="middle" />

  • I'll see if I can port CC's replace color shader. Getting pixels is generally not a good idea since it involves a very slow process of halting rendering and copying data from the GPU back to the CPU. Do you absolutely have to have it? I prefer not to implement features like this, because if mis-used it absolutely kills the performance (and probably means people coming to the forum wondering why their game is slow).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm well in CC I used it for swapping palettes and even rapid palette shifting on 3+ objects at once without any noticeable performance hits. Didn't seem to affect performance whatsoever, really. Can upload a video if you want :) I suppose it might be worse in C2 though. I understand your concern about people misusing it, but there are already many things that can cause performance issues if not used properly. Perhaps a warning could be issued if it really is that bad?

  • I've added a color replace shader for the next build. I was talking about the 'getrgb' expression when I was worried about performance - what do you usually use it for?

  • Oh, my bad. I use it in conjunction with the color replace shader so I can retrieve colors from palette images instead of entering the RGB values by hand. It's a huge time saver. I suppose it is sort of a niche feature but there are probably more useful things that can be done with it.

    Also thanks for adding the color replace shader! I was getting worried for a second there :)

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