30 vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
31 vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
32 vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
34 float d = q.x - min(q.w, q.y);
36 return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
41 vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
42 vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
43 return vec3(c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y));
54 return (abs(c1HSV.x-c2HSV.x)<0.05f)?
true:
false;
65 vec3 oppColor = vec3(mod(((c1HSV.x*360)+180), 360)/360, c2HSV.yz);
75 colorNew = color1.rgb+(1-
color.a)*color2.a*color2.rgb;
79 colorNew = color1.rgb+(1-
color.a)*color2.a*color2Prime;
82 colorNew = color1Prime+(1-
color.a)*color2.a*color2.rgb;
100 for(
float i=0;i<
depth;i++)
110 x = 1.0f - volPosition.x;
111 y = 1.0f - volPosition.y;
117 z = 1.0f - volPosition.y;
121 y = 1 - volPosition.x;
122 z = 1.0f - volPosition.y;
127 z = 1.0f - volPosition.y;
130 x = 1 - volPosition.x;
132 z = 1.0f - volPosition.y;
135 colorB.a = texture(
volume,vec3(x,y,z)).r;
143 if(
color.a==1){
break;}
bool equalHue(vec3 color1, vec3 color2)
uniform vec4 regionColor1
vec3 huePreservingBlending(vec4 color1, vec4 color2)
uniform vec4 regionColor2
uniform float regionSeperator
vec3 oppositeColor(vec3 color1, vec3 color2)