Remove all comments from shaders

This commit is contained in:
Frederic Junod
2018-04-03 09:54:21 +02:00
parent bc54693382
commit 2effa1182e
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ function glsl_compress(s, shortNames) {
// strip multi-line comments
s = s.replace(/\/\*[\s\S]*?\*\//g, '');
// strip single line comments
s = s.replace(/\/\/.*?\n/, '');
s = s.replace(/\/\/.*?\n/g, '');
// replace multiple whitespace with a single space
s = s.replace(/\s+/g, ' ');
// remove whitespace between non-word tokens