Add getFrag parser for WebGL fragment shader

This commit is contained in:
Christoph Diehl 2018-02-23 06:44:11 +01:00
parent f280f25cd7
commit a05cb5e6ff
No known key found for this signature in database
GPG key ID: 799CE5B68FEF404A

View file

@ -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('')))
},