summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/input.run.txt2
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html109
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag21
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert22
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert21
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag21
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert22
14 files changed, 355 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/input.run.txt
new file mode 100644
index 0000000000..4121dd5f8c
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+smoothstep_001_to_006.html
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html
new file mode 100644
index 0000000000..cec8b66e41
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html
@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT. -->
+<!--
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: smoothstep_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../../resources/ogles-tests.css" />
+<script src="../../../../js/js-test-pre.js"></script>
+<script src="../../../../js/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_float_frag_xvary_edgeconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_float_frag_xvary_edgeconstquarter.frag"
+ },
+ "name": "smoothstep_float_frag_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec2_frag_xvary_edgeconstquarter.frag"
+ },
+ "name": "smoothstep_vec2_frag_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec3_frag_xvary_edgeconstquarter.frag"
+ },
+ "name": "smoothstep_vec3_frag_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "smoothstep_float_vert_xvary_edgeconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "smoothstep_float_vert_xvary_edgeconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "smoothstep_float_vert_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "smoothstep_vec2_vert_xvary_edgeconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "smoothstep_vec2_vert_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "smoothstep_vec3_vert_xvary_edgeconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "smoothstep_vec3_vert_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag
new file mode 100644
index 0000000000..051294c841
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag
@@ -0,0 +1,19 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ gl_FragColor = vec4(smoothstep(edge0, edge1, color.r), 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag
new file mode 100644
index 0000000000..811dcdd942
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag
@@ -0,0 +1,21 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ float c = clamp((color.r - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ gl_FragColor = vec4(c * c * (3.0 - 2.0 * c), 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert
new file mode 100644
index 0000000000..a42ca379dd
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert
@@ -0,0 +1,20 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ color = vec4(smoothstep(edge0, edge1, gtf_Color.r), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert
new file mode 100644
index 0000000000..8bd69f3b62
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert
@@ -0,0 +1,22 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ float c = clamp((gtf_Color.r - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ color = vec4(c * c * (3.0 - 2.0 * c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag
new file mode 100644
index 0000000000..6d32c3d4b9
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag
@@ -0,0 +1,19 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ gl_FragColor = vec4(smoothstep(edge0, edge1, color.rg), 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag
new file mode 100644
index 0000000000..ffb365002f
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag
@@ -0,0 +1,20 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ vec2 c = clamp((color.rg - edge0) / (edge1 - edge0), 0.0, 1.0);
+ gl_FragColor = vec4(c * c * (3.0 - 2.0 * c), 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert
new file mode 100644
index 0000000000..0c55476372
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert
@@ -0,0 +1,20 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ color = vec4(smoothstep(edge0, edge1, gtf_Color.rg), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert
new file mode 100644
index 0000000000..0864a3af9b
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert
@@ -0,0 +1,21 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ vec2 c = clamp((gtf_Color.rg - edge0) / (edge1 - edge0), 0.0, 1.0);
+ color = vec4(c * c * (3.0 - 2.0 * c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag
new file mode 100644
index 0000000000..caca3c1f95
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag
@@ -0,0 +1,19 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ gl_FragColor = vec4(smoothstep(edge0, edge1, color.rgb), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag
new file mode 100644
index 0000000000..e9ea52ad64
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag
@@ -0,0 +1,21 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ vec3 c = clamp((color.rgb - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ gl_FragColor = vec4(c * c * (3.0 - 2.0 * c), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert
new file mode 100644
index 0000000000..6aa8d8c3e4
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert
@@ -0,0 +1,20 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ color = vec4(smoothstep(edge0, edge1, gtf_Color.rgb), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert
new file mode 100644
index 0000000000..2f12993b0f
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert
@@ -0,0 +1,22 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ vec3 c = clamp((gtf_Color.rgb - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ color = vec4(c * c * (3.0 - 2.0 * c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}