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 default value for uniforms in visual shaders #40754

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Jul 27, 2020

Added possibility to the setup a default value for Float,Int,Boolean,Color,Vector and Transform uniforms.

image

Closes godotengine/godot-proposals#807

@Chaosus Chaosus force-pushed the vs_default_uniforms branch from c394e11 to 8fefdcf Compare July 27, 2020 12:44
@Chaosus Chaosus requested a review from a team as a code owner July 27, 2020 12:44
@@ -1486,6 +1486,8 @@ class VisualShaderNodeFloatUniform : public VisualShaderNodeUniform {
float hint_range_min;
float hint_range_max;
float hint_range_step;
bool default_value_enabled;
Copy link
Member

Choose a reason for hiding this comment

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

This should likely be done in a separate PR, but we now initialize member variables directly in their declaration in the header, instead of deferring it to the constructor.

So you could refactor all VisualShaderNodes to move all those initializations to the header.

@akien-mga akien-mga merged commit eb0a67c into godotengine:master Jul 28, 2020
@akien-mga
Copy link
Member

Thanks!

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.

Add a default value to uniform nodes in Visual Shader editor
2 participants