Sha256: 916a96fd8606d0eff1d42f519140fbe86e91ba52aeedc55f7d59be8eb7eacc46
Contents?: true
Size: 1.27 KB
Versions: 4
Compression:
Stored size: 1.27 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.LuminosityShader = mod.exports; } })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports.LuminosityShader = void 0; /** * Luminosity * http://en.wikipedia.org/wiki/Luminosity */ var LuminosityShader = { uniforms: { 'tDiffuse': { value: null } }, 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\t#include <common>\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\n\t\t\tfloat l = linearToRelativeLuminance( texel.rgb );\n\n\t\t\tgl_FragColor = vec4( l, l, l, texel.w );\n\n\t\t}" }; _exports.LuminosityShader = LuminosityShader; });
Version data entries
4 entries across 4 versions & 1 rubygems