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

Support statements at top level, for e.g. discard #39

Open
emnh opened this issue Apr 29, 2017 · 1 comment
Open

Support statements at top level, for e.g. discard #39

emnh opened this issue Apr 29, 2017 · 1 comment

Comments

@emnh
Copy link

emnh commented Apr 29, 2017

As it looks gamma only supports assignments at the top level, since the "ast" function in program.cljs maps to g/set k v over the top level dictionary. The discard statement is needed for proper transparency sorting, as described in https://www.khronos.org/opengl/wiki/Transparency_Sorting .

I resorted to putting a magic vector vec4(0.0, 1.0, 2.0, 3.0) and then doing a search/replace on the glsl string to insert a discard later, but that's not very robust to changes in the gamma compiler. Is there a better temporary hack? And is support for imperative statements expected in the future or completely out of scope?

@skrat
Copy link

skrat commented Jun 8, 2017

+1

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