const quad = require('glsl-quad');
const regl = require('regl')();
let frag = `
THIS IS AN OBVIOUSLY BAD SHADER.
IT SHOULD THROW AN ERROR.
BUT REGL ONLY THROWS AN ERROR IN DEBUG MODE.
WHICH MEANS WE WILL ONLY SEE A WARNING. (CHECK
THE CONSOLE).
CAN WE GET REQUIREBIN
TO USE DEBUG MODE?
`;
let draw = regl({
vert: quad.shader.vert,
frag: frag,
attributes: {
a_position: quad.verts,
a_uv: quad.uvs
},
elements: quad.indices,
uniforms: {
u_clip_y: 1
}
});
draw();
requirebin seems to use browserify without
--debug
, it would be nice if requirebin turned debug mode on.Example using regl (working requirebin):