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

Fix using post-init shader array constructors #44705

Merged
merged 1 commit into from
Dec 27, 2020

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Dec 26, 2020

Currently, its impossible to use post-initialized array constructors like:

void fragment() {
  float t[3];
  t = float[3](0.0, 1.0, 0.0); // ERROR
}

or

varying float v[3];

void vertex() {
	v = {0.0, 1.0, 0.0}; // ERROR
}

So, I've fixed it and now it's possible (GLSL support it)

@Chaosus Chaosus added this to the 4.0 milestone Dec 26, 2020
@Chaosus Chaosus force-pushed the shader_fix_array_postinit branch 2 times, most recently from a17e834 to ce7205d Compare December 26, 2020 19:42
@Chaosus Chaosus changed the title Fix using post-init shader array constructors [WIP] Fix using post-init shader array constructors Dec 26, 2020
@Chaosus Chaosus changed the title [WIP] Fix using post-init shader array constructors Fix using post-init shader array constructors Dec 26, 2020
@Chaosus Chaosus merged commit ef4e625 into godotengine:master Dec 27, 2020
@Chaosus Chaosus deleted the shader_fix_array_postinit branch December 27, 2020 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants