UNPKG

gl-plane

Version:

Draw a plane with texture

3 lines (2 loc) 359 B
declare const _default: "#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\nvarying vec2 f_uv;\n\nvoid main() {\n if(opacity == 0.0) {\n discard;\n }\n gl_FragColor = opacity * texture2D(texture,vec2(f_uv.x,1.0 - f_uv.y));\n}\n"; export default _default;