tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

uniform-struct-with-non-square-matrix.html (1292B)


      1 <!--
      2 Copyright (c) 2019 The Khronos Group Inc.
      3 Use of this source code is governed by an MIT-style license that can be
      4 found in the LICENSE.txt file.
      5 -->
      6 
      7 <!DOCTYPE html>
      8 <html>
      9 <head>
     10 <meta charset="utf-8">
     11 <title>GLSL uniform struct with a non-square matrix test</title>
     12 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
     13 <script src="../../js/js-test-pre.js"></script>
     14 <script src="../../js/webgl-test-utils.js"></script>
     15 <script src="../../js/glsl-conformance-test.js"></script>
     16 </head>
     17 <body>
     18 <div id="description"></div>
     19 <div id="console"></div>
     20 <script id="fshaderUniformStructWithNonSquareMatrixAndBoolean" type="x-shader/x-fragment">#version 300 es
     21 precision highp float;
     22 out highp vec4 my_color;
     23 struct S
     24 {
     25    mat2x4 m;
     26    bool b;
     27 };
     28 uniform S uni;
     29 void main()
     30 {
     31    my_color = vec4(0, 1, 0, 1);
     32    if (!uni.b) { my_color.g = 0.0; }
     33 }
     34 </script>
     35 <script type="application/javascript">
     36 "use strict";
     37 description();
     38 
     39 GLSLConformanceTester.runRenderTests([
     40 {
     41  fShaderId: 'fshaderUniformStructWithNonSquareMatrixAndBoolean',
     42  fShaderSuccess: true,
     43  linkSuccess: true,
     44  passMsg: 'Set a boolean member in a uniform struct that also contains a non-square-matrix',
     45  uniforms: [{name: "uni.b", functionName: "uniform1i", value: 1}]
     46 },
     47 ], 2);
     48 </script>
     49 </body>
     50 </html>