math - How to replicate adding/mixing of HSV values in RGB space -


at moment i'm doing colourizing effect using additive blending in hsv space. have diff value in hsv space added image texture's individual pixels desired color effect. turning out expensive fragment shader has 2 costly conversions addition

  1. rgb -> hsv
  2. hsv addition
  3. hsv -> rgb

is there better way this? diff value provided in hsv only. , final color representation in rgb draw.

many thanks,

sak

you can similar effect hsv manipulations using color matrix in rgb. example, rotation around r=g=b axis similar hue addition. (adding x degrees in hue channel similar rotation of x degrees around r=g=b in rgb.) translation along r=g=b axis similar value addition. (i believe adding x value channel should similar adding x of r, g, , b.) , uniform scale perpendicular r=g=b axis similar saturation addition. don't know off top of head exact translation between adding x saturation , scaling in rgb, shouldn't hard work out. should able compose these matrixes single matrix, , implement single matrix multiply rgb value.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -