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

Implement custom function overloading in shading language #92441

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented May 27, 2024

Closes godotengine/godot-proposals#2808

изображение

Note: in order to prevent ambiguity between function overloading and constant conversion, the constant conversion of similar types will be disabled when the overloads exist on the function call.

@AThousandShips AThousandShips requested a review from a team May 27, 2024 19:52
@Chaosus Chaosus added this to the 4.x milestone May 27, 2024
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 6 times, most recently from efae1f3 to f0fc098 Compare May 28, 2024 08:47
@Chaosus
Copy link
Member Author

Chaosus commented May 28, 2024

Okay, I think I've fixed warnings and completion issues, if other users or contributors want to test it extensively please welcome (@paddy-exe, @Calinou, @clayjohn)

@Chaosus Chaosus marked this pull request as ready for review May 28, 2024 08:50
@Chaosus Chaosus requested a review from a team as a code owner May 28, 2024 08:50
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 3 times, most recently from 65aebc6 to 5529b79 Compare May 29, 2024 11:23
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 9 times, most recently from a321fe2 to c2b6561 Compare May 31, 2024 06:13
@Chaosus Chaosus changed the title Implement function overloading in shading language Implement custom function overloading in shading language May 31, 2024
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 2 times, most recently from de55ee3 to 02b307c Compare May 31, 2024 09:30
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 5 times, most recently from d1ebf76 to a5cc0a2 Compare June 4, 2024 11:14
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 3 times, most recently from 837180a to a9ada17 Compare June 9, 2024 08:59
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally in all rendering methods (rebased on top of master a7aa835), it works as expected.

Finally a use case for implicit float → int conversions not being allowed in GLSL. 😛

simplescreenrecorder-2024-06-11_16.51.55.mp4

Testing project: test_pr_92441.zip

@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 2 times, most recently from a9dc16f to 9be7e72 Compare June 12, 2024 09:46
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 6 times, most recently from 6d6cf01 to f0f39ba Compare July 24, 2024 08:59
@Chaosus Chaosus modified the milestones: 4.x, 4.4 Jul 25, 2024
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch from f0f39ba to b690b21 Compare August 20, 2024 18:55
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch 4 times, most recently from 43e3e9e to 8252027 Compare October 8, 2024 12:50
@Chaosus Chaosus force-pushed the shader_custom_func_overloads branch from 8252027 to 1c86fee Compare October 8, 2024 12:54
@Repiteo Repiteo merged commit af77100 into godotengine:master Oct 14, 2024
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 14, 2024

Thanks!

@Chaosus Chaosus deleted the shader_custom_func_overloads branch October 14, 2024 19:22
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.

Implement function overloading for user functions in the shader language
4 participants