From Terry Welsh, "As I mentioned here
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg33967.html , interpolating through HSV space gives a rainbow color effect which does not mimic the simple RGB color interpolation that OpenGL does. It's overkill and causes unexpected visual artifacts. In the attached files I've removed the conversion to HSV so that interpolation happens in RGB space."
This commit is contained in:
@@ -397,10 +397,8 @@ protected:
|
||||
osg::Vec4 _colorGradientBottomRight;
|
||||
osg::Vec4 _colorGradientTopRight;
|
||||
|
||||
// Helper functions for color interpolation
|
||||
// Helper function for color interpolation
|
||||
float bilinearInterpolate(float x1, float x2, float y1, float y2, float x, float y, float q11, float q12, float q21, float q22) const;
|
||||
void convertHsvToRgb( float hsv[], float rgb[] ) const;
|
||||
void convertRgbToHsv( float rgb[], float hsv[] ) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user