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

Allow preprocessor directives in GLSL shader blocks #1015

Closed
nphollon opened this issue Aug 14, 2015 · 3 comments
Closed

Allow preprocessor directives in GLSL shader blocks #1015

nphollon opened this issue Aug 14, 2015 · 3 comments

Comments

@nphollon
Copy link

I would like to make use of WebGL's frag depth extension in my code. In Elm, the syntax for this would look like

fragmentShader = [glsl|
  #extension GL_EXT_frag_depth : require
  ...
|]

There are a few additional preprocessor directives for GLSL. Unfortunately, the Elm compiler throws an error if I try to begin a line with #.

The syntax works fine with WebGL.unsafeShader, but it would be nicer to be able to use a shader block instead.

@evancz
Copy link
Member

evancz commented Aug 14, 2015

We rely on https://hackage.haskell.org/package/language-glsl to parse the GLSL code and get out the information we need. I think they'd have to add support for this there.

@evancz
Copy link
Member

evancz commented Aug 19, 2015

Have you tried asking them about it on their github repo? Should we close this? What's up?

@nphollon
Copy link
Author

Looks like there is already an issue open on their repo, although it's been dormant for over a year. I will try to get it fixed on their end. Thanks for your help!

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