UNPKG

gl-plane

Version:

Draw a plane with texture

19 lines (15 loc) 390 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = `#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec2 f_uv; void main() { if(opacity == 0.0) { discard; } gl_FragColor = opacity * texture2D(texture,vec2(f_uv.x,1.0 - f_uv.y)); } `;