Sha256: 261e1bf27c5c2dc2449a2aa6a2fe67827481ff7d5472e6220bb935130c193475

Contents?: true

Size: 1.53 KB

Versions: 4

Compression:

Stored size: 1.53 KB

Contents

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

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

  /**
   * Color correction
   */
  var ColorCorrectionShader = {
    uniforms: {
      'tDiffuse': {
        value: null
      },
      'powRGB': {
        value: new _three.Vector3(2, 2, 2)
      },
      'mulRGB': {
        value: new _three.Vector3(1, 1, 1)
      },
      'addRGB': {
        value: new _three.Vector3(0, 0, 0)
      }
    },
    vertexShader:
    /* glsl */
    "\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",
    fragmentShader:
    /* glsl */
    "\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec3 powRGB;\n\t\tuniform vec3 mulRGB;\n\t\tuniform vec3 addRGB;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );\n\n\t\t}"
  };
  _exports.ColorCorrectionShader = ColorCorrectionShader;
});

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/ColorCorrectionShader.js
opal-js_wrap-three-0.1.4 lib-opal/js_wrap/three/shaders/ColorCorrectionShader.js
opal-js_wrap-three-0.1.3 lib-opal/js_wrap/three/shaders/ColorCorrectionShader.js
opal-js_wrap-three-0.1.2 lib-opal/js_wrap/three/shaders/ColorCorrectionShader.js