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

msl variable initialization in code #62

Open
aconstlink opened this issue Mar 6, 2024 · 0 comments
Open

msl variable initialization in code #62

aconstlink opened this issue Mar 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@aconstlink
Copy link
Owner

aconstlink commented Mar 6, 2024

It would be nice to be able to initialize declared variables in code so the user does not need to handle that variable from the application side.

Example:

vec3_t my_value = vec3_t( 1.0f, 2.0f, 3.0f ) ;

Variables are inserted into variables set anyway during the shader compilation process in the rendering backends, so the default value could simply be read out and assigned to the variable created in the variable set.

Possible obstacles:
If a variable is getting assigned a default value after the user already has assigned a value via a variable set it can not be determined if that variable in the variable set is created by the run-time or the user. So which variable is the correct one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant