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

Structs and fragment-to-light varyings for 3.4 #48075

Merged
merged 7 commits into from
May 18, 2021

Conversation

lyuma
Copy link
Contributor

@lyuma lyuma commented Apr 22, 2021

Backport of the following PRs by @Chaosus to 3.x, adding support for structs and the ability to declare varyings between fragment and light functions:

All changes support GLES2 and GLES3.

#35249 Implementation of struct for shaders
#36141 Added support for arrays as shader struct members
#44705 Fix using post-init shader array constructors
#44698 Allow passing varying from fragment to light shader function
#36251 Fix shader crash if duplicated struct members created
#46272 Prevents shader crash if passing invalid struct to the return statement
#46275 Prevents shader crash if two struct with the same name are declared

@lyuma lyuma force-pushed the varying_fragment_to_light_3.4 branch from 07d4e33 to 111d459 Compare April 22, 2021 01:26
@Chaosus Chaosus added this to the 3.4 milestone Apr 22, 2021
@lyuma lyuma marked this pull request as ready for review April 22, 2021 06:03
@lyuma lyuma requested review from a team as code owners April 22, 2021 06:03
@Chaosus
Copy link
Member

Chaosus commented Apr 22, 2021

@lyuma Great! But there are some post-release patches for structs maded by me:
#36251
#46272
#46275
If you could merge the changes from them that would be perfect.

@lyuma
Copy link
Contributor Author

lyuma commented Apr 22, 2021

Sure thing. I also see a couple other small bugfixes in the commit history. I'll go through them tomorrow. Luckily they all seem small and easy to merge.

@lyuma lyuma force-pushed the varying_fragment_to_light_3.4 branch from 111d459 to 2d1f8f2 Compare May 14, 2021 18:29
@lyuma
Copy link
Contributor Author

lyuma commented May 14, 2021

@Chaosus I have backported the remaining three changes from the set, and updated it to accommodate the recent reformatting update from last week.

@Chaosus Chaosus self-requested a review May 16, 2021 08:40
Copy link
Member

@Chaosus Chaosus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, and thank you, @lyuma. Unfortunaly I'm unable to check it up on my PC properly now (I'm in hospital) but I trust you and approve it.

@akien-mga akien-mga merged commit 330ddc3 into godotengine:3.x May 18, 2021
@akien-mga
Copy link
Member

Thanks!

@lyuma lyuma deleted the varying_fragment_to_light_3.4 branch May 19, 2021 01:36
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.

3 participants