diff options
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance')
14 files changed, 321 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_001_to_006.html new file mode 100644 index 0000000000..04d2aee15f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_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: distance_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": "distance_float_frag_xvaryyhalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "distance_float_frag_xvaryyhalf.frag" + }, + "name": "distance_float_frag_xvaryyhalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "distance_vec2_frag_xvaryyhalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "distance_vec2_frag_xvaryyhalf.frag" + }, + "name": "distance_vec2_frag_xvaryyhalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "distance_vec3_frag_xvaryyhalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "distance_vec3_frag_xvaryyhalf.frag" + }, + "name": "distance_vec3_frag_xvaryyhalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "distance_float_vert_xvaryyhalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "distance_float_vert_xvaryyhalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "distance_float_vert_xvaryyhalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "distance_vec2_vert_xvaryyhalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "distance_vec2_vert_xvaryyhalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "distance_vec2_vert_xvaryyhalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "distance_vec3_vert_xvaryyhalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "distance_vec3_vert_xvaryyhalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "distance_vec3_vert_xvaryyhalf.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag new file mode 100644 index 0000000000..0d0a2e8a4b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag @@ -0,0 +1,17 @@ + +/* +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) +{ + gl_FragColor = vec4(vec3(distance(color.r, 0.5)), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag new file mode 100644 index 0000000000..46d1e32f30 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag @@ -0,0 +1,17 @@ + +/* +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) +{ + gl_FragColor = vec4(vec3(sqrt(pow(abs(color.r - 0.5), 2.0))), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert new file mode 100644 index 0000000000..9c915dc981 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert @@ -0,0 +1,18 @@ + +/* +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) +{ + color = vec4(vec3(distance(gtf_Color.r, 0.5)), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert new file mode 100644 index 0000000000..a66dee0a24 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert @@ -0,0 +1,18 @@ + +/* +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) +{ + color = vec4(vec3(sqrt(pow(abs(gtf_Color.r - 0.5), 2.0))), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag new file mode 100644 index 0000000000..bec06c2a9b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag @@ -0,0 +1,17 @@ + +/* +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) +{ + gl_FragColor = vec4(vec3(distance(color.rg, vec2(0.5))), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag new file mode 100644 index 0000000000..ff73840933 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag @@ -0,0 +1,17 @@ + +/* +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) +{ + gl_FragColor = vec4(vec3(sqrt(pow(abs(color.r - 0.5), 2.0) + pow(abs(color.g - 0.5), 2.0))), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert new file mode 100644 index 0000000000..398e1cfb7a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert @@ -0,0 +1,18 @@ + +/* +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) +{ + color = vec4(vec3(distance(gtf_Color.rg, vec2(0.5))), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert new file mode 100644 index 0000000000..c2cd4c9361 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert @@ -0,0 +1,18 @@ + +/* +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) +{ + color = vec4(vec3(sqrt(pow(abs(gtf_Color.r - 0.5), 2.0) + pow(abs(gtf_Color.g - 0.5), 2.0))), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag new file mode 100644 index 0000000000..b65a37d5aa --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag @@ -0,0 +1,17 @@ + +/* +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) +{ + gl_FragColor = vec4(vec3(distance(color.rgb, vec3(0.5))), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag new file mode 100644 index 0000000000..a4517828d1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag @@ -0,0 +1,17 @@ + +/* +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) +{ + gl_FragColor = vec4(vec3(sqrt(pow(abs(color.r - 0.5), 2.0) + pow(abs(color.g - 0.5), 2.0) + pow(abs(color.b - 0.5), 2.0))), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert new file mode 100644 index 0000000000..2efe949b12 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert @@ -0,0 +1,18 @@ + +/* +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) +{ + color = vec4(vec3(distance(gtf_Color.rgb, vec3(0.5))), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert new file mode 100644 index 0000000000..0d24c7ce82 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert @@ -0,0 +1,18 @@ + +/* +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) +{ + color = vec4(vec3(sqrt(pow(abs(gtf_Color.r - 0.5), 2.0) + pow(abs(gtf_Color.g - 0.5), 2.0) + pow(abs(gtf_Color.b - 0.5), 2.0))), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/input.run.txt new file mode 100644 index 0000000000..bfbce99ed1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/distance/input.run.txt @@ -0,0 +1,2 @@ +# this file is auto-generated. DO NOT EDIT. +distance_001_to_006.html |