UNPKG

molstar

Version:

A comprehensive macromolecular library.

10 lines 831 B
"use strict"; /** * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ Object.defineProperty(exports, "__esModule", { value: true }); exports.accumulate_frag = void 0; exports.accumulate_frag = "\nprecision highp float;\n\nvarying vec3 vPosition;\nvarying vec3 vColor;\n\nuniform float uCurrentSlice;\nuniform float uCurrentX;\nuniform float uCurrentY;\nuniform float uResolution;\n\nconst float p = 2.0;\n\nvoid main() {\n vec2 v = gl_FragCoord.xy - vec2(uCurrentX, uCurrentY) - 0.5;\n vec3 fragPos = vec3(v.x, v.y, uCurrentSlice);\n float dist = distance(fragPos, vPosition);\n if (dist > p) discard;\n\n gl_FragColor = vec4(vColor, 1.0) * (p - dist);\n}\n"; //# sourceMappingURL=accumulate.frag.js.map