Skip to content

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

@emnh

Description

@emnh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions