Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: conformance/glsl/functions/glsl-function-smoothstep-gentype.html

Issue 8342021: Add webgl conformance tests r15841. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!--
2 Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <title>GLSL smoothstep-gentype function test</title>
11 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
12 <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
13 <script src="../../../resources/js-test-pre.js"></script>
14 <script src="../../resources/webgl-test.js"> </script>
15 <script src="../../resources/webgl-test-utils.js"> </script>
16 <script src="../../resources/glsl-generator.js"> </script>
17 </head>
18 <body>
19 <div id="description"></div>
20 <div id="console"></div>
21 <script>
22
23
24 GLSLGenerator.runFeatureTest({
25 feature: "smoothstep",
26 args: "$(type) edge0, $(type) edge1, $(type) value",
27 baseArgs: "edge0$(field), edge1$(field), value$(field)",
28 testFunc: "$(func)($(type), $(type), $(type))",
29 emuFunc: ["float $(func)_base(float edge0, float edge1, float value) {",
30 " float t = clamp((value - edge0) / (edge1 - edge0), 0.0, 1.0);",
31 " return t * t * (3.0 - 2.0 * t);",
32 "}"].join("\n"),
33 gridRes: 8,
34 tests: [
35 ["$(output) = vec4(",
36 " $(func)(0.3, 0.7, $(input).x),",
37 " $(func)(0.2, 0.8, $(input).y),",
38 " 0,",
39 " 1);"].join("\n"),
40 ["$(output) = vec4(",
41 " $(func)(vec2(0.4, 0.6), vec2(0.8, 0.9), $(input).xy),",
42 " 0, 1);"].join("\n"),
43 ["$(output) = vec4(",
44 " $(func)(vec3(0.3, 0.5, 0.7), vec3(0.7, 0.9, 1.0), $(input).xyz),",
45 " 1);"].join("\n"),
46 ["$(output) = ",
47 " $(func)(vec4(0.3, 0.4, 0.5, 0.2), ",
48 " vec4(0.7, 0.6, 0.9, 0.8), ",
49 " $(input));"].join("\n")
50 ]
51 });
52 successfullyParsed = true;
53 </script>
54 </body>
55 </html>
56
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698