UNPKG

@luma.gl/shadertools

Version:

Shader module system for luma.gl

13 lines (12 loc) 511 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.warp = void 0; var fs = "vec4 warp_sampleColor(sampler2D texture, vec2 texSize, vec2 coord) {\n vec4 color = texture2D(texture, coord / texSize);\n vec2 clampedCoord = clamp(coord, vec2(0.0), texSize);\n if (coord != clampedCoord) {\n color.a *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n return color;\n}\n"; var warp = { name: 'warp', fs: fs }; exports.warp = warp; //# sourceMappingURL=warp.js.map