Sha256: 4f72f10e6a116671325a390b3875a40f88edc01e676705f86d73452ef1093282

Contents?: true

Size: 1.2 KB

Versions: 4

Compression:

Stored size: 1.2 KB

Contents

(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(["exports"], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports);
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports);
    global.CopyShader = mod.exports;
  }
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.CopyShader = void 0;

  /**
   * Full-screen textured quad shader
   */
  var CopyShader = {
    uniforms: {
      'tDiffuse': {
        value: null
      },
      'opacity': {
        value: 1.0
      }
    },
    vertexShader:
    /* glsl */
    "\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",
    fragmentShader:
    /* glsl */
    "\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\t\t}"
  };
  _exports.CopyShader = CopyShader;
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
opal-js_wrap-three-0.1.5 lib-opal/js_wrap/three/shaders/CopyShader.js
opal-js_wrap-three-0.1.4 lib-opal/js_wrap/three/shaders/CopyShader.js
opal-js_wrap-three-0.1.3 lib-opal/js_wrap/three/shaders/CopyShader.js
opal-js_wrap-three-0.1.2 lib-opal/js_wrap/three/shaders/CopyShader.js