https://c2rsetup.officeapps.live.com/c2r/downloadVS.aspx?sku=community&channel=Stable&version=VS18
https://c2rsetup.officeapps.live.com/c2r/downloadVS.aspx?sku=enterprise&channel=Stable&version=VS18
| // because http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl is often down | |
| vec3 rgb2hsv(vec3 c) | |
| { | |
| vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
| vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); | |
| vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); | |
| float d = q.x - min(q.w, q.y); | |
| float e = 1.0e-10; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.