color wheel and picker
This commit is contained in:
@@ -177,7 +177,7 @@ void App::initShaders()
|
||||
"}";
|
||||
static const char* shader_color_quad_f =
|
||||
SHADER_VERSION
|
||||
"uniform mediump vec4 col;"
|
||||
"uniform mediump vec4 col; // HSV\n"
|
||||
"in mediump vec3 uv;"
|
||||
"out mediump vec4 frag;"
|
||||
"mediump vec3 rgb2hsv(mediump vec3 c) {"
|
||||
@@ -194,8 +194,7 @@ void App::initShaders()
|
||||
" return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);"
|
||||
"}"
|
||||
"void main() {"
|
||||
" mediump float hue = rgb2hsv(col.rgb).x;"
|
||||
" frag = vec4(hsv2rgb(vec3(hue, uv.x, 1.0 - uv.y)), 1.0);"
|
||||
" frag = vec4(hsv2rgb(vec3(col.x, uv.x, 1.0 - uv.y)), 1.0);"
|
||||
"}";
|
||||
// COLOR TRI
|
||||
static const char* shader_color_tri_f =
|
||||
|
||||
Reference in New Issue
Block a user