molstar
Version:
A comprehensive macromolecular library.
23 lines (18 loc) • 656 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.hiZ_frag = void 0;
exports.hiZ_frag = `
precision highp float;
precision highp sampler2D;
uniform sampler2D tPreviousLevel;
uniform vec2 uInvSize;
uniform vec2 uOffset;
void main(void) {
vec2 position = gl_FragCoord.xy * uInvSize + uOffset;
float x = texture(tPreviousLevel, position).r;
float y = textureOffset(tPreviousLevel, position, ivec2(-1, 0)).r;
float z = textureOffset(tPreviousLevel, position, ivec2(-1, -1)).r;
float w = textureOffset(tPreviousLevel, position, ivec2(0, -1)).r;
gl_FragColor = vec4(max(max(x, y), max(z, w)));
}
`;
;