Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualapatriarca

Posted 05 July 2013 - 01:49 PM

That code first computes a "grayscale color" from the input color (using the formula for Luma used in hdtv it seems) and then linearly interpolate between the input color and the grayscale color. Using that formula with negative amount you may get some component of the color greater than one. Depending on your needs you may want to clamp the result.


#1apatriarca

Posted 05 July 2013 - 01:47 PM

That code first computes a "grayscale color" from the input color (using the luminance formula used in hdtv it seems) and then linearly interpolate between the input color and the grayscale color. Using that formula with negative amount you may get some component of the color greater than one. Depending on your needs you may want to clamp the result.


PARTNERS