summaryrefslogtreecommitdiff
path: root/shaders/skia/58-11.shader_test
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/skia/58-11.shader_test')
-rw-r--r--shaders/skia/58-11.shader_test52
1 files changed, 52 insertions, 0 deletions
diff --git a/shaders/skia/58-11.shader_test b/shaders/skia/58-11.shader_test
new file mode 100644
index 0000000..80db009
--- /dev/null
+++ b/shaders/skia/58-11.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in float vinCoverage_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+