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 for uniform structures in GLSL #2689

Open
Cheemsandfriends opened this issue Feb 23, 2024 · 0 comments
Open

Support for uniform structures in GLSL #2689

Cheemsandfriends opened this issue Feb 23, 2024 · 0 comments

Comments

@Cheemsandfriends
Copy link
Contributor

"Structs are defined much like C++ (note: the C-style typedef struct *{} syntax is not supported). GLSL does not support anonymous structures (ie: structs without a type name), and structs must have at least one member declaration. Structs cannot be defined within another struct, but one struct can use another previously defined struct as a member." More Information.

Structs could be used to organise better your shader code, since this acts as a class without addable functions, letting you make several instances of that code without having a cluttered uniform variable instancing.

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

No branches or pull requests

1 participant