From a05cb5e6ffe3d03a9fb1dc24291211a59f198060 Mon Sep 17 00:00:00 2001 From: Christoph Diehl <1614333+posidron@users.noreply.github.com> Date: Fri, 23 Feb 2018 06:44:11 +0100 Subject: [PATCH] Add getFrag parser for WebGL fragment shader --- lib/make/webgl.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/make/webgl.js b/lib/make/webgl.js index 7e7b415..db6f384 100644 --- a/lib/make/webgl.js +++ b/lib/make/webgl.js @@ -65,6 +65,9 @@ make.webgl = { } return names }, + parseFrag: (shader) => { + return shader.match(/(gl_Frag[^[ =]+)/gm) + }, randomBitmask: () => { return parseInt((random.subset([1, 0], 8).join(''))) },