<?xml version="1.0" encoding="ISO-8859-1"?><root><shaders>
<shader name="vshader"> attribute vec2 vertexCoords; attribute vec4 textureCoords; varying vec4 texcoords; uniform mat3 matrix; void main() { vec3 transformedCoords = matrix * vec3(vertexCoords, 1.0); gl_Position = vec4(transformedCoords.xy, 0.0, 1.0); texcoords = textureCoords; } </shader>
<shader name="pen"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform vec4 invresolution; uniform sampler2D texture0; uniform sampler2D texture1; uniform vec4 offset2; void main() { float l = 0.5-length(texcoords.xy-vec2(0.5,0.5)); float q = (1.0-invresolution.w); float a = smoothstep(0.,1.,q*q*clamp(l,0.,0.5)*10.0); float b = float(l>0.0); float c = (invresolution.w>0.03) ? a : b; float alpha = color.a * texcoords.z; alpha*=alpha; gl_FragColor = vec4(color.r,color.g,color.b,c * alpha); gl_FragColor = mix(gl_FragColor, vec4(color.r,color.g,color.b,alpha), vec4(invresolution.z &#60; 1.5)); vec2 vpos = gl_FragCoord.xy*invresolution.xy; vec2 t = vpos*offset2.zw+offset2.xy; vec4 mask = texture2D(texture0,t) * float(t == clamp(t,0.,1.)); vec4 color = gl_FragColor; gl_FragColor *= mask.rrrg; } </shader>
<shader name="linevshader"> attribute vec4 vertexCoords; attribute vec4 textureCoords; varying vec4 texcoords; varying vec4 texcoords2; uniform mat3 matrix; void main() { vec3 transformedCoords = matrix * vec3(vertexCoords.xy, 1.0); gl_Position = vec4(transformedCoords.xy, 0.0, 1.0); texcoords = textureCoords; texcoords2 = vec4(vertexCoords.zw, 0, 0); } </shader>
<shader name="line"> precision highp float; varying vec4 texcoords; varying vec4 texcoords2; uniform vec4 color; uniform vec4 invresolution; uniform sampler2D texture0; uniform sampler2D texture1; uniform vec4 offset2; void main() { vec2 vpos = gl_FragCoord.xy*invresolution.xy; vec4 linecoords = texcoords; vec2 m = linecoords.zw - linecoords.xy; float t = clamp( dot(m, vpos-linecoords.xy) / dot(m,m), 0.0, 1.0); vec2 p = linecoords.xy + m * t; float d = length((vpos.xy-p.xy)/invresolution.xy); d = smoothstep((invresolution.z-2.)/2.0, (invresolution.z+2.)/2.0, d); float dg = 0.0; gl_FragColor = vec4(color.r,color.g,color.b, (1.-d) * color.a * texcoords2.x ); vec2 mt = vpos*offset2.zw+offset2.xy; vec4 color = gl_FragColor; vec4 mask = texture2D(texture0,mt) * float(mt == clamp(mt,0.,1.)); gl_FragColor *= mask.rrrg; } </shader>
<shader name="shape"> precision highp float; varying vec4 texcoords; varying vec4 texcoords2; uniform vec4 color; uniform vec4 color2; uniform vec4 invresolution; uniform sampler2D texture0; uniform vec4 offset2; float sdOval(vec2 vpos, vec2 m) { vec2 scale = 2./(m.xy); vec2 offset = - 1./scale; vec2 c = (vpos+offset); float v = 0.00001+sqrt(scale.x * scale.x * c.x * c.x + scale.y * scale.y * c.y * c.y); float gradx = scale.x * scale.x * c.x; float grady = scale.y * scale.y * c.y; float gradlength = 2. * length(vec2(gradx, grady)); float d = 1.-v; d = v * d / gradlength; return d; } float udOval(vec2 vpos, vec2 m) { vec2 scale = 2./(m.xy); vec2 offset = - 1./scale; vec2 c = (vpos+offset); for (int k=0;k&#60;100;k++) { float v = ( scale.x*scale.x * c.x * c.x + scale.y*scale.y * c.y * c.y - 1.0 ); float h = v*v; vec2 grad = 2.*v*scale*scale*c; float grad_len2 = dot(grad, grad); if (grad_len2 &#60; 0.00000001) break; float s = 1.0 * h / (grad_len2); c-=s*grad; } return length(vpos+offset-c); } void main() { vec2 vpos = gl_FragCoord.xy; vec4 linecoords = texcoords / invresolution.xyxy; vec2 m = linecoords.zw - linecoords.xy; #ifdef LINE float t = clamp( dot(m, vpos-linecoords.xy) / dot(m,m), 0.0, 1.0); vec2 p = linecoords.xy + m * t; float d = length(vpos.xy-p.xy); float ld = mix(smoothstep((invresolution.z-2.)/2.0, (invresolution.z+2.)/2.0, d), d, float(invresolution.z &#60;= 1.) ); vec4 outp = vec4(color.r,color.g,color.b, (1.-ld) ); float od = abs(d-invresolution.z/2.); od = smoothstep((invresolution.w-2.)/2.0, (invresolution.w+2.)/2.0, od); vec4 outline = vec4(color2.r,color2.g,color2.b, 1.-od ); outp = mix( vec4( mix(outp.rgb, outline.rgb, (d &#60; invresolution.z/2.) ? outline.a : 1.), max(outp.a,outline.a)), outp, float(invresolution.w &#60;= 1.) ); gl_FragColor = outp * vec4(1.,1.,1., color.a * texcoords2.x ); #endif #ifdef RECT vec2 inside = (vpos-linecoords.xy)/m; vec4 outp = vec4(color.r,color.g,color.b, color.a * float(inside == clamp(inside,0.,1.))); vec2 d = abs(vpos-linecoords.xy-m.xy*0.5) - m.xy*0.5; float od = min(max(d.x,d.y),0.0) + length(max(d,0.0)); float bInside = float(!(od &#60; 0.)); od = abs(od); od = smoothstep((invresolution.w-2.)/2.0, (invresolution.w+2.)/2.0, od); vec4 outline = vec4(color2.r,color2.g,color2.b, 1.-od ); outp = mix( vec4( mix(outp.rgb, outline.rgb, clamp(outline.a + bInside,0.,1.)), max(outp.a,outline.a)), outp, float(invresolution.w &#60;= 1.) ); gl_FragColor = outp * vec4(1.,1.,1., color.a * texcoords2.x ); #endif #ifdef OVAL vpos-=linecoords.xy; float d = sdOval(vpos, m.xy); vec4 outp = vec4(color.r,color.g,color.b, clamp(d,0.,1.) ); float od = udOval(vpos, m.xy)*0.5; od = smoothstep((invresolution.w-2.)/2.0, (invresolution.w+2.)/2.0, od); vec4 outline = vec4(color2.r,color2.g,color2.b, 1.-od ); if (!all(lessThan(abs(vpos-m.xy*0.5),(m.xy*0.1)))) { float a = mix(outp.a, 1.0, float(!(d &#60; 1.0)) ); vec3 c = mix(outp.rgb, outline.rgb, (od &#60; invresolution.z/2.) ? outline.a : 1.); float ca = a; vec4 nc = vec4( c, ca); outp = mix( nc, outp, float(invresolution.w &#60; 1.) ); } gl_FragColor = outp * vec4(1.,1.,1., color.a * texcoords2.x ); #endif vec2 tt = gl_FragCoord.xy*invresolution.xy; tt = tt*offset2.zw+offset2.xy; vec4 mask = texture2D(texture0,tt).rrrg * float(tt == clamp(tt,0.,1.)); gl_FragColor *= mask; } </shader>
<shader name="brush"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform vec4 invresolution; uniform sampler2D texture0; uniform sampler2D texture1; uniform sampler2D texture2; uniform vec4 offset2; void main() { float l = texture2D(texture1,texcoords.xy).r; float q = invresolution.w; float l2 = max(abs(texcoords.x-0.5), abs(texcoords.y-0.5)); l = smoothstep(0.000, q, l); l=1.-l; vec4 col2 = color; float alpha = col2.a*texcoords.z; alpha*=alpha; gl_FragColor = vec4(col2.r,col2.g,col2.b,clamp(l,0.,1.)*alpha); vec2 vpos = gl_FragCoord.xy*invresolution.xy; vec2 t = vpos*offset2.zw+offset2.xy; vec4 mask = texture2D(texture0,t) * float(t == clamp(t,0.,1.)); vec4 color = gl_FragColor; gl_FragColor *= mask.rrrg; } </shader>
<shader name="blurcolorshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform vec4 offset; uniform vec4 offset2; uniform vec4 oldxy; uniform vec4 invresolution; uniform sampler2D texture0; uniform sampler2D texture1; uniform vec4 offset3; void main() { vec2 vpos = gl_FragCoord.xy*invresolution.xy; vpos += (oldxy.z>0.0) ? (normalize(oldxy.xy) * invresolution.xy) : vec2(0.0, 0.0); vec2 tpos = (vpos - offset.xy) / offset.zw; vec2 t = tpos*offset2.zw+offset2.xy; gl_FragColor = texture2D(texture1,t); float l = 1.-length(texcoords.xy+texcoords.xy-vec2(1.0,1.0)); float alpha = color.a * texcoords.z; gl_FragColor.a = l*alpha; vec2 tt = vpos*offset3.zw+offset3.xy; vec4 mask = texture2D(texture0,tt).rrrg * float(tt == clamp(tt,0.,1.)); gl_FragColor *= mask; gl_FragColor = clamp(gl_FragColor,0.,1.); } </shader>
<shader name="bluralphashader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform vec4 offset; uniform vec4 offset2; uniform vec4 oldxy; uniform vec4 invresolution; uniform sampler2D texture0; uniform sampler2D texture1; uniform vec4 offset3; void main() { vec2 vpos = gl_FragCoord.xy*invresolution.xy; vpos += (oldxy.z>0.0) ? (normalize(oldxy.xy) * invresolution.xy) : vec2(0.0, 0.0); vec2 tpos = (vpos - offset.xy) / offset.zw; vec2 t = tpos*offset2.zw+offset2.xy; gl_FragColor = texture2D(texture1,t); float l = 1.-length(texcoords.xy+texcoords.xy-vec2(1.0,1.0)); gl_FragColor.r = gl_FragColor.a; float alpha = color.a*texcoords.z; alpha*=alpha; gl_FragColor.a = l*alpha; vec2 tt = vpos*offset3.zw+offset3.xy; vec4 mask = texture2D(texture0,tt).grrr * float(tt == clamp(tt,0.,1.)); gl_FragColor *= mask; gl_FragColor = clamp(gl_FragColor,0.,1.); } </shader>
<shader name="blur1shader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform vec4 offset; uniform vec4 delta; void main() { vec2 t = texcoords.xy*offset.zw+offset.xy; float g = 1.0; vec4 dg = vec4(vec3(g),1.); vec4 t0 = texture2D(texture0, t + delta.xy*0.0); vec4 t1 = texture2D(texture0, t + delta.xy*1.0); vec4 t2 = texture2D(texture0, t - delta.xy*1.0); float t0a = (1.-t0.a); float t1a = (1.-t1.a); float t2a = (1.-t2.a); float t0w = t0a; float t1w = t1a * delta.z; float t2w = t2a * delta.z; vec4 s0 = pow(clamp(t0,0.,1.),dg) * vec4(1.0); vec4 s1 = pow(clamp(t1,0.,1.),dg) * vec4(delta.z); vec4 s2 = pow(clamp(t2,0.,1.),dg) * vec4(delta.z); float w = t0w + t1w + t2w; gl_FragColor = s0 + s1 + s2; gl_FragColor /= vec4( vec3( (w>0.001) ? w : 1.0 ), delta.w); gl_FragColor = pow(clamp(gl_FragColor,0.,1.), vec4(vec3(1./g),1.)); gl_FragColor.rgb *= 1.0-gl_FragColor.a; } </shader>
<shader name="clone1shader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform vec4 offset; uniform vec4 delta; void main() { vec2 t0 = texcoords.xy*offset.zw+offset.xy; vec4 tex0 = texture2D(texture0,t0); tex0 = clamp(tex0,0.,1.); tex0.rgb/=1.0001-tex0.a; float inside0 = (t0 == clamp(t0,0.,1.) ? 1. : 0.); tex0.a = 1.-(1.-tex0.a)*inside0; vec2 t1 = texcoords.xy*delta.zw+delta.xy; vec4 tex1 = texture2D(texture0,t1); tex1 = clamp(tex1,0.,1.); tex1.rgb/=1.0001-tex1.a; float inside1 = (t1 == clamp(t1,0.,1.) ? 1. : 0.); tex1.a = 1.-(1.-tex1.a)*inside1; tex0.rgb *= 1.-tex0.a; tex1.rgb *= 1.-tex1.a; tex0.a = 1.-tex0.a; tex1.a = 1.-tex1.a; vec4 r; r.a = (tex1.a) + tex0.a * (1.-tex1.a); r.rgb = tex1.rgb + tex0.rgb * (1.-tex1.a); r.a = 1.-r.a; gl_FragColor = r; } </shader>
<shader name="texshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy); } </shader>
<shader name="opacityshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy)*color; } </shader>
<shader name="compositeshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform vec4 mask; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy)*color; gl_FragColor = clamp(gl_FragColor,0.,1.0); gl_FragColor.rgb = mix( gl_FragColor.rgb, gl_FragColor.aaa * vec3(1.0,0.0,0.0), mask.aaa * gl_FragColor.aaa); } </shader>
<shader name="viewshader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy); } </shader>
<shader name="opacityshaderpremulalpha"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy)*color; gl_FragColor.rgb*=gl_FragColor.aaa; } </shader>
<shader name="opacityinvertalphashader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy); gl_FragColor.rgb*=color.rgb*color.a; gl_FragColor.a = 1.0-(1.0-gl_FragColor.a)*color.a; } </shader>
<shader name="blend_shader2"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform vec4 props; uniform vec4 offset; uniform sampler2D texture0; uniform sampler2D texture1; void main() { vec4 src = texture2D(texture0,texcoords.xy); vec2 dstcoords = texcoords.xy * offset.xy + (offset.zw); vec4 dst = texture2D(texture1,dstcoords); #ifdef HDR if (props.x>=1.0) { src.a = 1.0-src.a; if (src.a!=0.) src.rgb/=src.a; } src.rgb *= props.y; src.rgb = pow(src.rgb, vec3(props.z)); if (props.x>=1.0) { src.rgb*=src.a; src.a = 1.0-src.a; } #endif #ifdef NORMAL if (props.x==0.) { src.rgba*=color; src.rgb = src.rgb*src.a + dst.rgb*(1.-src.a); src.a = dst.a * (1.-src.a); } if (props.x==1.) { src.rgb*=color.a; src.a = 1.0-(1.0-src.a)*color.a; src.rgb = src.rgb + dst.rgb*src.a; src.a = dst.a*src.a; } if (props.x==2.) { src.rgba*=color; src.rgb = src.rgb + dst.rgb*src.a; src.a = dst.a*src.a; } #endif #ifdef ADD if (props.x==0.) { src.rgba*=color; src.rgb = src.rgb*src.a + dst.rgb; src.a = dst.a*(1.-src.a); } if (props.x==1.) { src.rgb*=color.a; src.a = 1.0-(1.0-src.a)*color.a; src.rgb = src.rgb + dst.rgb; src.a = dst.a * src.a; } if (props.x==2.) { src.rgba*=color; src.rgb = src.rgb + dst.rgb; src.a = dst.a * src.a; } #endif #ifdef SCREEN if (props.x==0.) { src.rgba *= color; src.rgb *= src.aaa; src.rgb = src.rgb * (vec3(1.)-dst.rgb) + dst.rgb; src.a = dst.a * (1.-src.a); } if (props.x==1.) { src.rgb*=color.a; src.a = 1.-(1.-src.a)*color.a; src.rgb = src.rgb * (vec3(1.)-dst.rgb) + dst.rgb; src.a = dst.a * src.a; } if (props.x==2.) { src.rgba *= color; src.rgb = src.rgb * (vec3(1.)-dst.rgb) + dst.rgb; src.a = dst.a * src.a; } #endif #ifdef HDR gl_FragColor = vec4(clamp(src.rgb,0.,1000.), clamp(src.a, 0., 1.) ); #else gl_FragColor = clamp(src.rgba, 0., 1.); #endif } </shader>
<shader name="blend_shader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform vec4 props; uniform vec4 offset; uniform sampler2D texture0; uniform sampler2D texture1; void main() { vec4 src = texture2D(texture0,texcoords.xy); vec2 dstcoords = texcoords.xy * offset.xy + (offset.zw); vec4 dst = texture2D(texture1,dstcoords); #ifndef HDR src = clamp(src, 0., 1.); dst = clamp(dst, 0., 1.); #endif #ifdef PREMUL_ALPHA if (props.x>=1.0) { src.a = 1.0-src.a; if (src.a!=0.) src.rgb/=src.a; } #endif #ifdef PREMUL_ALPHA dst.a = 1.-dst.a; if (dst.a!=0.) dst.rgb /= dst.a; #endif #ifdef HDR src.rgb *= props.y; src.rgb = pow(src.rgb, vec3(props.z)); #endif #ifdef REPLACE src.rgb = mix(dst.rgb, src.rgb, color.a); src.a = clamp(mix(dst.a, src.a, color.a),0.,1.); #else #ifdef REPLACECOLOR src.rgb = mix(dst.rgb, src.rgb, color.a); src.a = dst.a; #else #ifdef REPLACEALPHA src.rgb = dst.rgb; src.a = clamp(mix(dst.a, src.a, color.a),0.,1.); #else src.a *= color.a; #endif #endif #endif #ifdef SUBTRACT src.rgb = (dst.rgb-src.rgb) * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef DESTOVER src.rgb *= src.a; dst.rgb *= dst.a; src.rgb = src.rgb * (1.0 - dst.a) + dst.rgb; src.a = src.a + dst.a * (1.0 - src.a); src.rgb /= max(src.a, 1e-5); #endif #ifdef DIFFERENCE src.rgb = abs(dst.rgb-src.rgb) * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef MULTIPLY src.rgb = dst.rgb*src.rgb * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef DARKEN src.rgb = min(dst.rgb,src.rgb) * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef LIGHTEN src.rgb = max(dst.rgb,src.rgb) * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef OVERLAY vec3 C = src.rgb - 0.5; src.rgb = (dst.rgb + (1.0 - 2.0*dst.rgb)*abs(C) + C) * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef HARDLIGHT vec3 A = mix( 1.-2.*(1.-dst.rgb)*(1.-src.rgb), 2.*dst.rgb*src.rgb, vec3(lessThanEqual(dst.rgb, vec3(0.5, 0.5, 0.5))) ); src.rgb = A * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef COLORDODGE vec3 r = min(vec3(1.),dst.rgb/(vec3(1.)-src.rgb)); r = mix( vec3(0.), r, vec3(greaterThan(dst.rgb,vec3(0.))) ); r = mix( vec3(1.), r, vec3(lessThan(src.rgb,vec3(1.))) ); src.rgb = r * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef COLORBURN vec3 r = vec3(1.)-min(vec3(1.),((vec3(1.)-dst.rgb)/src.rgb)); r = mix( vec3(0.), r, vec3(greaterThan(src.rgb,vec3(0.))) ); r = mix( vec3(1.), r, vec3(lessThan(dst.rgb,vec3(1.))) ); src.rgb = r * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef LINEARLIGHT vec3 r = 2.*src.rgb + dst.rgb - vec3(1.); r = clamp( r, vec3(0.), vec3(1.)); src.rgb = r * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef VIVIDLIGHT vec3 a = vec3(1.)-min(vec3(1.),(vec3(1.)-dst.rgb)/(2.*src.rgb)); vec3 b = min(vec3(1.),dst.rgb/(2.*(vec3(1.)-src.rgb))); vec3 r = mix( a, b, vec3(greaterThan(src.rgb,vec3(0.5))) ); r = mix( vec3(0.), r, vec3(greaterThan(src.rgb,vec3(0.))) ); r = mix( vec3(1.), r, vec3(lessThan(src.rgb,vec3(1.))) ); src.rgb = r * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef PINLIGHT vec3 darken = mix(src.rgb, min(dst.rgb,src.rgb), 2.*src.rgb-1.0); vec3 lighten = mix(src.rgb, max(dst.rgb,src.rgb), 2.*(src.rgb-0.5) ); vec3 r = mix( darken, lighten, vec3(greaterThan(src.rgb,vec3(0.5))) ); src.rgb = r * (src.a*dst.a) + src.rgb*src.a*(1.-dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = src.a + dst.a - dst.a*src.a; #endif #ifdef INVERT vec3 A = 1.-dst.rgb; src.rgb = A * (src.a*dst.a) + dst.rgb*(1.-src.a)*dst.a; src.a = dst.a; #endif #ifdef PREMUL_ALPHA src.rgb *= src.a; src.a = 1.0-src.a; #endif #ifdef HDR gl_FragColor = vec4(clamp(src.rgb,0.,1000.), clamp(src.a, 0., 1.) ); #else gl_FragColor = clamp(src.rgba, 0., 1.); #endif } </shader>
<shader name="copyshader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform vec4 offset; void main() { gl_FragColor = texture2D(texture0,texcoords.xy*offset.zw+offset.xy); gl_FragColor = clamp(gl_FragColor,0.,1.); } </shader>
<shader name="copyclampshader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform vec4 offset; void main() { vec2 t = texcoords.xy*offset.zw+offset.xy; gl_FragColor = texture2D(texture0,t); gl_FragColor = clamp(gl_FragColor,0.,1.); float inside = (t == clamp(t,0.,1.) ? 1. : 0.); gl_FragColor.a = 1.-(1.-gl_FragColor.a)*inside; } </shader>
<shader name="copyatorshader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform vec4 offset; void main() { gl_FragColor = texture2D(texture0,texcoords.xy*offset.zw+offset.xy); gl_FragColor.rgb = gl_FragColor.aaa; } </shader>
<shader name="copyrtoashader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform sampler2D texture1; uniform vec4 offset; void main() { gl_FragColor.rgb = texture2D(texture0,texcoords.xy*offset.zw+offset.xy).rgb; gl_FragColor.a = texture2D(texture1,texcoords.xy*offset.zw+offset.xy).r; } </shader>
<shader name="copymaskedshader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform sampler2D texture1; uniform vec4 offset; uniform vec4 offset2; void main() { gl_FragColor = texture2D(texture0,texcoords.xy*offset.zw+offset.xy); vec2 t = texcoords.xy*offset2.zw+offset2.xy; float a = texture2D(texture1,t).r * float(t == clamp(t,0.,1.)); gl_FragColor.a*=a; } </shader>
<shader name="copymaskedpremulshader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform sampler2D texture1; uniform vec4 offset; uniform vec4 offset2; void main() { gl_FragColor = texture2D(texture0,texcoords.xy*offset.zw+offset.xy); vec2 t = texcoords.xy*offset2.zw+offset2.xy; float a = texture2D(texture1,t).r * float(t == clamp(t,0.,1.)); gl_FragColor.a=(1.0-gl_FragColor.a)*a; gl_FragColor.rgb*=a; gl_FragColor.rgb/=gl_FragColor.a; } </shader>
<shader name="rotateshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; uniform mat3 mat; uniform vec4 props; vec4 degamma(vec4 f) { return pow(f, vec4(props.w, props.w, props.w, 1.0)); } vec4 gamma(vec4 f) { return pow(f, vec4(1.0/props.w, 1.0/props.w, 1.0/props.w, 1.0)); } vec4 depremul(vec4 f) { return f; } vec4 premul(vec4 f) { return f; } vec4 SampleTexture(vec2 uv, vec2 texSize) { vec2 samplePos = uv * texSize; vec2 texPos0 = floor(samplePos - 0.5) + 0.5; vec2 f = samplePos - texPos0; vec4 a1 = degamma(depremul(texture2D(texture0, (texPos0.xy + vec2(0., 0.)) / texSize ))); vec4 b1 = degamma(depremul(texture2D(texture0, (texPos0.xy + vec2(1., 0.)) / texSize ))); vec4 a2 = degamma(depremul(texture2D(texture0, (texPos0.xy + vec2(0., 1.)) / texSize ))); vec4 b2 = degamma(depremul(texture2D(texture0, (texPos0.xy + vec2(1., 1.)) / texSize ))); vec4 t1 = mix(a1, b1, f.x); vec4 t2 = mix(a2, b2, f.x); vec4 result = mix(t1, t2, f.y); return result; } vec4 SampleTextureCatmullRom( vec2 uv, vec2 texSize ) { vec2 samplePos = uv * texSize; vec2 texPos1 = floor(samplePos - 0.5) + 0.5; vec2 f = samplePos - texPos1; vec2 w0 = f * ( -0.5 + f * (1.0 - 0.5*f)); vec2 w1 = 1.0 + f * f * (-2.5 + 1.5*f); vec2 w2 = f * ( 0.5 + f * (2.0 - 1.5*f) ); vec2 w3 = f * f * (-0.5 + 0.5 * f); vec2 w12 = w1 + w2; vec2 offset12 = w2 / (w1 + w2); vec2 texPos0 = texPos1 - vec2(1.0); vec2 texPos3 = texPos1 + vec2(2.0); vec2 texPos12 = texPos1 + offset12; texPos0 /= texSize; texPos3 /= texSize; texPos12 /= texSize; vec4 result = vec4(0.0); result += SampleTexture(vec2(texPos0.x, texPos0.y),texSize) * w0.x * w0.y; result += SampleTexture(vec2(texPos12.x, texPos0.y),texSize) * w12.x * w0.y; result += SampleTexture(vec2(texPos3.x, texPos0.y),texSize) * w3.x * w0.y; result += SampleTexture(vec2(texPos0.x, texPos12.y),texSize) * w0.x * w12.y; result += SampleTexture(vec2(texPos12.x, texPos12.y),texSize) * w12.x * w12.y; result += SampleTexture(vec2(texPos3.x, texPos12.y),texSize) * w3.x * w12.y; result += SampleTexture(vec2(texPos0.x, texPos3.y),texSize) * w0.x * w3.y; result += SampleTexture(vec2(texPos12.x, texPos3.y),texSize) * w12.x * w3.y; result += SampleTexture(vec2(texPos3.x, texPos3.y),texSize) * w3.x * w3.y; return result; } void main() { vec4 r = vec4(0.,0.,0.,1.); vec3 c = vec3(texcoords.xy,1.0); c = mat*c; float a = float(c.xy == clamp(c.xy,0.,1.)); vec2 texPos0 = (floor(c.xy*props.xy - 0.5) + 0.5)/props.xy; vec4 s = texture2D(texture0, texPos0); vec4 s1 = premul(gamma(SampleTexture(c.xy,props.xy))); vec4 s2 = premul(gamma(SampleTextureCatmullRom(c.xy, props.xy))); if (props.z==1.) s = s1; if (props.z==2.) s = s2; r.rgb = a * s.rgb; r.a = s.a * a; gl_FragColor = r; } </shader>
<shader name="rescale_generic_shader"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform sampler2D texture1; uniform sampler2D texture2; uniform vec4 res; uniform vec4 scale; uniform vec4 props; vec4 degamma(vec4 f) { return vec4( mix( f.rgb/12.92, pow((f.rgb+vec3(0.055))/vec3(1.055), vec3(2.4)), vec3(greaterThan(f.rgb,vec3(0.04045))) ), f.a); } vec4 gamma(vec4 f) { return vec4( mix( f.rgb*12.92, vec3(1.055) * pow(f.rgb, vec3(1./2.4)) - vec3(0.055), vec3(greaterThan(f.rgb, vec3(0.0031308))) ), f.a); } void main() { vec2 ij = texcoords.xy * res.zw; vec2 xy = floor(ij); vec4 fragmentColor = vec4(0,0,0,0); for (int i = 0; i &#60; 4096; i++) { if (i>=int(scale.z)) continue; vec2 index = vec2( (float(i) + 0.5) / scale.z, (dot(floor(texcoords.xy * res.xy), scale.xy)+0.5) / scale.w ); float pixelindex = texture2D(texture1, index).x; float pixelweight = texture2D(texture2, index).x; vec4 col = clamp(texture2D(texture0, (((pixelindex + vec2(0.5, 0.5)) * scale.xy) + (xy+vec2(0.5, 0.5))*scale.yx) / res.zw ),0.,1.); col = mix(col, degamma(col), vec4(props.x)); fragmentColor += col * pixelweight; } fragmentColor = mix(fragmentColor, clamp( gamma( clamp(fragmentColor,0.0, 1.) ), 0., 1.), vec4(props.x)); gl_FragColor = fragmentColor; } </shader>
<shader name="fillshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; uniform sampler2D texture1; uniform sampler2D texture2; uniform vec4 offset2; uniform vec4 props; vec4 degamma(vec4 f) { return pow(f, vec4(2.2, 2.2, 2.2, 1.0)); } void main() { vec2 t = texcoords.xy*offset2.zw+offset2.xy; vec4 mask = texture2D(texture0,t) * float(t == clamp(t,0.,1.)); vec4 col = mix(degamma(color), color, props.x); gl_FragColor = col; gl_FragColor*=mask.rrrg; if (mask.b>0.) { if (mask.b &#60; 1.) { gl_FragColor=texture2D(texture2, vec2((mask.b*255.-1.+0.5)/255.0,0.)); vec4 ig = vec4(2.2, 2.2, 2.2, 1.0); if (gl_FragColor.a==0.) gl_FragColor = vec4(col.rgb, 1.-mask.g); else gl_FragColor = mix( mix(vec4(col.rgb,1.0), gl_FragColor, vec4(mask.g)), pow(mix(pow(vec4(col.rgb,1.0),ig), pow(gl_FragColor,ig), vec4(mask.g)), 1.0/ig) , vec4(props.x) ); gl_FragColor.a *= color.a; } } gl_FragColor = clamp(gl_FragColor,0.,1.); } </shader>
<shader name="fillblendcolsshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; uniform sampler2D texture1; uniform sampler2D texture2; uniform vec4 offset2; void main() { vec2 t = texcoords.xy*offset2.zw+offset2.xy; vec4 mask = texture2D(texture0,t) * float(t == clamp(t,0.,1.)); gl_FragColor = color; gl_FragColor.a=0.; if (mask.b>0.) { if (mask.b &#60; 1.) { gl_FragColor=texture2D(texture2, vec2((mask.b*255.-1.+0.5)/255.0,0.)); gl_FragColor.a = mask.g; } } gl_FragColor = clamp(gl_FragColor,0.,1.); } </shader>
<shader name="gradientshader"> precision highp float; varying vec4 texcoords; uniform vec4 color; uniform sampler2D texture0; uniform sampler2D texture1; uniform sampler2D texture2; uniform vec4 offset2; uniform float dither; uniform vec4 linecoords; uniform vec4 invresolution; uniform vec4 props; vec4 degamma(vec4 f) { return pow(f, vec4(2.2, 2.2, 2.2, 1.0)); } float random(vec3 scale, float seed) { return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); } void main() { float offset = (random(vec3(12.9898, 78.233, 151.7182), 0.0)*1.-0.5); vec2 t = texcoords.xy*offset2.zw+offset2.xy; vec4 mask = texture2D(texture0,t) * float(t == clamp(t,0.,1.)); vec2 vpos = (gl_FragCoord.xy+offset*dither)*invresolution.xy; vpos.x *= (1.0/invresolution.x)*invresolution.y; vec2 l1 = linecoords.xy; vec2 l2 = linecoords.zw; l1.x *= (1.0/invresolution.x)*invresolution.y; l2.x *= (1.0/invresolution.x)*invresolution.y; vec2 m = l2 - l1; float q = clamp( dot(m, vpos-l1) / dot(m,m), 0.0, 1.0); gl_FragColor.rgba = texture2D(texture1,vec2(q,0.0)).rgba; gl_FragColor.rgba = mix(degamma(gl_FragColor.rgba), gl_FragColor.rgba, vec4(props.x)); gl_FragColor.a *= color.a; vec4 c = gl_FragColor.rgba; gl_FragColor.a *= mask.r; } </shader>
<shader name="gridPS"> precision highp float; varying vec4 texcoords; uniform vec4 gridprops; uniform vec4 gridres; uniform vec4 gridsize; void main() { vec2 fullscale = gridres.xy/gridres.zw; gl_FragColor = vec4((gridres.xy*texcoords.xy),0.,0.); vec2 gpos = gridres.xy*texcoords.xy + 0.01*fullscale.xy/gridprops.xy; float center = float( !(mod(gpos.x-gridsize.z,gridsize.x) * gridprops.x >= fullscale.x) || !(mod(gpos.y-gridsize.w,gridsize.y) * gridprops.y >= fullscale.y) ); gl_FragColor = mix(vec4(0.,0.,0.,1.),vec4(0.3,0.3,0.3,0.5), float(center>0.)); } </shader>
<shader name="shadertestPS"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; void main() { gl_FragColor = vec4(texcoords.xy,0.,0.); } </shader>
<shader name="shadercopyPS"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy); } </shader>
<shader name="shadercopyclampPS"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; void main() { gl_FragColor = clamp(texture2D(texture0,texcoords.xy),0.,1.); } </shader>
<shader name="invertalphaPS"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy); gl_FragColor.a=1.0-gl_FragColor.a; } </shader>
<shader name="premulinvertalphaPS"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy); gl_FragColor.rgb*=gl_FragColor.a; gl_FragColor.a=1.0-gl_FragColor.a; } </shader>
<shader name="undopremulinvertalphaPS"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; void main() { gl_FragColor = texture2D(texture0,texcoords.xy); gl_FragColor.a=1.0-gl_FragColor.a; gl_FragColor.rgb/=gl_FragColor.a+0.00001; } </shader>
<shader name="shaderblendPS"> precision highp float; varying vec4 texcoords; uniform sampler2D texture0; uniform float opacity; void main() { vec4 f0 = texture2D(texture0,texcoords.xy); gl_FragColor = vec4(f0.rgba * opacity); } </shader>
<shader name="vshader_downsample"> attribute vec2 vertexCoords; attribute vec2 textureCoords; varying vec2 texcoords0; varying vec2 texcoords1; varying vec2 texcoords2; varying vec2 texcoords3; uniform mat3 matrix; uniform vec4 texelsize; void main() { vec3 transformedCoords = matrix * vec3(vertexCoords, 1.0); gl_Position = vec4(transformedCoords.xy, 0.0, 1.0); float offX = texelsize.x; float offY = texelsize.y; texcoords0 = textureCoords + vec2(-offX,-offY); texcoords1 = textureCoords + vec2( offX,-offY); texcoords2 = textureCoords + vec2( offX, offY); texcoords3 = textureCoords + vec2(-offX, offY); } </shader>
<shader name="pshader_downsample"> precision highp float; varying vec2 texcoords0; varying vec2 texcoords1; varying vec2 texcoords2; varying vec2 texcoords3; uniform sampler2D texture0; void main() { vec4 c0 = texture2D( texture0, texcoords0); vec4 c1 = texture2D( texture0, texcoords1); vec4 c2 = texture2D( texture0, texcoords2); vec4 c3 = texture2D( texture0, texcoords3); vec4 c = sqrt((c0*c0+c1*c1+c2*c2+c3*c3) / 4.0); c.a = (c0.a+c1.a+c2.a+c3.a) / 4.0; gl_FragColor = c; } </shader>
<shader name="pshader_downsample_hdr"> precision highp float; varying vec2 texcoords0; varying vec2 texcoords1; varying vec2 texcoords2; varying vec2 texcoords3; uniform vec4 props; uniform sampler2D texture0; void main() { vec4 c0 = texture2D( texture0, texcoords0); vec4 c1 = texture2D( texture0, texcoords1); vec4 c2 = texture2D( texture0, texcoords2); vec4 c3 = texture2D( texture0, texcoords3); vec4 c = sqrt((c0*c0+c1*c1+c2*c2+c3*c3) / 4.0); c.a = (c0.a+c1.a+c2.a+c3.a) / 4.0; vec4 c_hdr = (c0+c1+c2+c3) * 0.25; c_hdr.rgb = pow(c_hdr.rgb*props.zzz, vec3(1./props.y)); c.rgb = mix(c.rgb,c_hdr.rgb,props.xxx); gl_FragColor = c; } </shader>
<shader name="vshaderTest"> attribute vec3 vertexCoords; attribute vec4 textureCoords; varying vec4 texcoords; uniform mat4 matrix; uniform mat4 proj; void main() { gl_Position = proj * matrix * vec4(vertexCoords,1.0); texcoords = textureCoords; } </shader>
<shader name="test"> precision highp float; varying vec4 texcoords; void main() { gl_FragColor = vec4(1., 0., 0., 1.); } </shader>
</shaders>
<techniques>
<technique name="test" vshader="vshaderTest" fshader="test" constants="matrix, proj" ></technique>
<technique name="pen" vshader="vshader" fshader="pen" constants="matrix, color, invresolution, offset2" ></technique>
<technique name="brush" vshader="vshader" fshader="brush" constants="matrix, color, invresolution, offset2" ></technique>
<technique name="line" vshader="linevshader" fshader="line" constants="matrix, color, invresolution, offset2" ></technique>
<technique name="shapeline" vshader="linevshader" fshader="shape" define="LINE" constants="matrix, color, color2, invresolution, offset2" ></technique>
<technique name="shaperect" vshader="linevshader" fshader="shape" define="RECT" constants="matrix, color, color2, invresolution, offset2" ></technique>
<technique name="shapeoval" vshader="linevshader" fshader="shape" define="OVAL" constants="matrix, color, color2, invresolution, offset2" ></technique>
<technique name="blurcolor" vshader="vshader" fshader="blurcolorshader" constants="matrix, color, offset, offset2, offset3, invresolution, oldxy" ></technique>
<technique name="bluralpha" vshader="vshader" fshader="bluralphashader" constants="matrix, color, offset, offset2, offset3, invresolution, oldxy" ></technique>
<technique name="blur1" vshader="vshader" fshader="blur1shader" constants="matrix, color, invresolution, offset, delta" ></technique>
<technique name="clone1" vshader="vshader" fshader="clone1shader" constants="matrix, color, invresolution, offset, delta" ></technique>
<technique name="prog2" vshader="vshader" fshader="texshader" constants="matrix, color" ></technique>
<technique name="opacity" vshader="vshader" fshader="opacityshader" constants="matrix, color" ></technique>
<technique name="composite" vshader="vshader" fshader="compositeshader" constants="matrix, color, mask" ></technique>
<technique name="view" vshader="vshader" fshader="viewshader" constants="matrix" ></technique>
<technique name="opacityinvertalpha" vshader="vshader" fshader="opacityinvertalphashader" constants="matrix, color" ></technique>
<technique name="opacitypremulalpha" vshader="vshader" fshader="opacityshaderpremulalpha" constants="matrix, color" ></technique>
<technique name="blend_normal"       vshader="vshader" fshader="blend_shader2" define="NORMAL"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_add"          vshader="vshader" fshader="blend_shader2" define="ADD"           constants="matrix, color, props, offset" ></technique>
<technique name="blend_screen"       vshader="vshader" fshader="blend_shader2" define="SCREEN"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_multiply"     vshader="vshader" fshader="blend_shader"  define="MULTIPLY"      constants="matrix, color, props, offset" ></technique>
<technique name="blend_subtract"     vshader="vshader" fshader="blend_shader"  define="SUBTRACT"      constants="matrix, color, props, offset" ></technique>
<technique name="blend_difference"   vshader="vshader" fshader="blend_shader"  define="DIFFERENCE"    constants="matrix, color, props, offset" ></technique>
<technique name="blend_darken"       vshader="vshader" fshader="blend_shader"  define="DARKEN"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_lighten"      vshader="vshader" fshader="blend_shader"  define="LIGHTEN"       constants="matrix, color, props, offset" ></technique>
<technique name="blend_overlay"      vshader="vshader" fshader="blend_shader"  define="OVERLAY"       constants="matrix, color, props, offset" ></technique>
<technique name="blend_hardlight"    vshader="vshader" fshader="blend_shader"  define="HARDLIGHT"     constants="matrix, color, props, offset" ></technique>
<technique name="blend_colordodge"   vshader="vshader" fshader="blend_shader"  define="COLORDODGE"    constants="matrix, color, props, offset" ></technique>
<technique name="blend_colorburn"    vshader="vshader" fshader="blend_shader"  define="COLORBURN"     constants="matrix, color, props, offset" ></technique>
<technique name="blend_linearlight"  vshader="vshader" fshader="blend_shader"  define="LINEARLIGHT"   constants="matrix, color, props, offset" ></technique>
<technique name="blend_vividlight"   vshader="vshader" fshader="blend_shader"  define="VIVIDLIGHT"    constants="matrix, color, props, offset" ></technique>
<technique name="blend_pinlight"     vshader="vshader" fshader="blend_shader"  define="PINLIGHT"      constants="matrix, color, props, offset" ></technique>
<technique name="blend_invert"       vshader="vshader" fshader="blend_shader"  define="INVERT"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_replacealpha" vshader="vshader" fshader="blend_shader"  define="REPLACEALPHA"  constants="matrix, color, props, offset" ></technique>
<technique name="blend_replacecolor" vshader="vshader" fshader="blend_shader"  define="REPLACECOLOR"  constants="matrix, color, props, offset" ></technique>
<technique name="blend_replace"      vshader="vshader" fshader="blend_shader"  define="REPLACE"       constants="matrix, color, props, offset" ></technique>
<technique name="blend_destover"     vshader="vshader" fshader="blend_shader"  define="DESTOVER"      constants="matrix, color, props, offset" ></technique>
<technique name="blend_normal_hdr"       vshader="vshader" fshader="blend_shader2" define="HDR,NORMAL"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_add_hdr"          vshader="vshader" fshader="blend_shader2" define="HDR,ADD"           constants="matrix, color, props, offset" ></technique>
<technique name="blend_screen_hdr"       vshader="vshader" fshader="blend_shader2" define="HDR,SCREEN"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_multiply_hdr"     vshader="vshader" fshader="blend_shader"  define="HDR,MULTIPLY"      constants="matrix, color, props, offset" ></technique>
<technique name="blend_subtract_hdr"     vshader="vshader" fshader="blend_shader"  define="HDR,SUBTRACT"      constants="matrix, color, props, offset" ></technique>
<technique name="blend_difference_hdr"   vshader="vshader" fshader="blend_shader"  define="HDR,DIFFERENCE"    constants="matrix, color, props, offset" ></technique>
<technique name="blend_darken_hdr"       vshader="vshader" fshader="blend_shader"  define="HDR,DARKEN"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_lighten_hdr"      vshader="vshader" fshader="blend_shader"  define="HDR,LIGHTEN"       constants="matrix, color, props, offset" ></technique>
<technique name="blend_overlay_hdr"      vshader="vshader" fshader="blend_shader"  define="HDR,OVERLAY"       constants="matrix, color, props, offset" ></technique>
<technique name="blend_hardlight_hdr"    vshader="vshader" fshader="blend_shader"  define="HDR,HARDLIGHT"     constants="matrix, color, props, offset" ></technique>
<technique name="blend_colordodge_hdr"   vshader="vshader" fshader="blend_shader"  define="HDR,COLORDODGE"    constants="matrix, color, props, offset" ></technique>
<technique name="blend_colorburn_hdr"    vshader="vshader" fshader="blend_shader"  define="HDR,COLORBURN"     constants="matrix, color, props, offset" ></technique>
<technique name="blend_linearlight_hdr"  vshader="vshader" fshader="blend_shader"  define="HDR,LINEARLIGHT"   constants="matrix, color, props, offset" ></technique>
<technique name="blend_vividlight_hdr"   vshader="vshader" fshader="blend_shader"  define="HDR,VIVIDLIGHT"    constants="matrix, color, props, offset" ></technique>
<technique name="blend_pinlight_hdr"     vshader="vshader" fshader="blend_shader"  define="HDR,PINLIGHT"      constants="matrix, color, props, offset" ></technique>
<technique name="blend_invert_hdr"       vshader="vshader" fshader="blend_shader"  define="HDR,INVERT"        constants="matrix, color, props, offset" ></technique>
<technique name="blend_replacealpha_hdr" vshader="vshader" fshader="blend_shader"  define="HDR,REPLACEALPHA"  constants="matrix, color, props, offset" ></technique>
<technique name="blend_replacecolor_hdr" vshader="vshader" fshader="blend_shader"  define="HDR,REPLACECOLOR"  constants="matrix, color, props, offset" ></technique>
<technique name="blend_replace_hdr"      vshader="vshader" fshader="blend_shader"  define="HDR,REPLACE"       constants="matrix, color, props, offset" ></technique>
<technique name="blend_destover_hdr"     vshader="vshader" fshader="blend_shader"  define="HDR,DESTOVER"      constants="matrix, color, props, offset" ></technique>
<technique name="copy" vshader="vshader" fshader="copyshader" constants="matrix, offset, offset2" ></technique>
<technique name="copymasked" vshader="vshader" fshader="copymaskedshader" constants="matrix, offset, offset2" ></technique>
<technique name="copymaskedpremul" vshader="vshader" fshader="copymaskedpremulshader" constants="matrix, offset, offset2" ></technique>
<technique name="copyclamp" vshader="vshader" fshader="copyclampshader" constants="matrix, offset, offset2" ></technique>
<technique name="rescale_generic" vshader="vshader" fshader="rescale_generic_shader" constants="matrix, scale, res, props" ></technique>
<technique name="rescale_generic_hdr" vshader="vshader" fshader="rescale_generic_shader" constants="matrix, scale, res, props" ></technique>
<technique name="rotate" vshader="vshader" fshader="rotateshader" constants="matrix, color, mat, props" ></technique>
<technique name="copyator" vshader="vshader" fshader="copyatorshader" constants="matrix, offset" ></technique>
<technique name="copyrtoa" vshader="vshader" fshader="copyrtoashader" constants="matrix, offset" ></technique>
<technique name="fill" vshader="vshader" fshader="fillshader" constants="matrix, color, offset2, props" ></technique>
<technique name="gradient" vshader="vshader" fshader="gradientshader" constants="matrix, color, offset2, linecoords, invresolution, dither, props" ></technique>
<technique name="fillblendcols" vshader="vshader" fshader="fillblendcolsshader" constants="matrix, color, offset2" ></technique>
<technique name="shadercopy" vshader="vshader" fshader="shadercopyPS" constants="matrix" ></technique>
<technique name="shadertest" vshader="vshader" fshader="shadertestPS" constants="matrix" ></technique>
<technique name="shadercopyclamp" vshader="vshader" fshader="shadercopyclampPS" constants="matrix" ></technique>
<technique name="shaderblend" vshader="vshader" fshader="shaderblendPS" constants="matrix, opacity" ></technique>
<technique name="grid" vshader="vshader" fshader="gridPS" constants="matrix, gridprops, gridres, gridsize" ></technique>
<technique name="premulinvertalpha" vshader="vshader" fshader="premulinvertalphaPS" constants="matrix" ></technique>
<technique name="invertalphapremul" vshader="vshader" fshader="undopremulinvertalphaPS" constants="matrix" ></technique>
<technique name="downsample" vshader="vshader_downsample" fshader="pshader_downsample" constants="matrix, texelsize" ></technique>
<technique name="downsample_hdr" vshader="vshader_downsample" fshader="pshader_downsample_hdr" constants="matrix, texelsize, props" ></technique>
<technique name="invertalpha" vshader="vshader" fshader="invertalphaPS" constants="matrix" ></technique>
</techniques>
</root>
