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

Added local shader array initializer #30596

Merged
merged 1 commit into from
Jul 16, 2019

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Jul 15, 2019

Continuation of #30500

image

@Chaosus Chaosus requested a review from reduz as a code owner July 15, 2019 15:48
@Chaosus Chaosus changed the title Added local array initializer Added local shader array initializer Jul 15, 2019
@Chaosus Chaosus added this to the 3.2 milestone Jul 15, 2019
@Chaosus
Copy link
Member Author

Chaosus commented Jul 15, 2019

Also added deducted initializer for the array

instead of

float test[3] = float[3] (0.0, 1.0, 1.0);

user can write

float test[3] = {0.0, 1.0, 1.0};

@Chaosus Chaosus changed the title Added local shader array initializer [WIP] Added local shader array initializer Jul 15, 2019
@Chaosus
Copy link
Member Author

Chaosus commented Jul 15, 2019

Also added third init form which is

float t[] = { 0.0, 0.0, 1.0 };

In that case array size is deducting from the argument count inside the curly brackets

@Chaosus Chaosus changed the title [WIP] Added local shader array initializer Added local shader array initializer Jul 15, 2019
@Chaosus Chaosus requested review from akien-mga and removed request for reduz July 15, 2019 17:03
@Chaosus Chaosus force-pushed the shader_array_init branch 2 times, most recently from 659aa79 to ad65290 Compare July 16, 2019 03:57
@Chaosus
Copy link
Member Author

Chaosus commented Jul 16, 2019

Ok, I think its a bug-free. In the next step I would probably implement an inout array parameters in functions..

@Chaosus Chaosus merged commit 8202ba2 into godotengine:master Jul 16, 2019
@Chaosus Chaosus deleted the shader_array_init branch July 16, 2019 04:54
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.

1 participant