Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isShaderString will return true even for non shader string #147

Open
thebiltheory opened this issue Jan 28, 2023 · 1 comment
Open

isShaderString will return true even for non shader string #147

thebiltheory opened this issue Jan 28, 2023 · 1 comment

Comments

@thebiltheory
Copy link

I get the following error when using the string literal argument.

WARNING: 0:24: 'glslify' : unrecognized pragma
ERROR: 0:46: 'snoise' : no matching overloaded function found
ERROR: 0:58: 'snoise' : no matching overloaded function found

After looking at default export I realised the regex might be sending the shader to the wrong path due to the regex not working properly.

var isShaderString = /(void\s+main\s?\(.*\)|\n)/.test(arg)

See Sandbox:
https://codesandbox.io/s/youthful-rgb-eisffz?file=/src/index.js

@QX0111
Copy link

QX0111 commented Feb 17, 2023

I also encountered this problem, did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants