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

Allow passing non-variable constant to const function param in shaders #55113

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Nov 19, 2021

Fix incorrect error when passing values to the function with const parameter:

shader_type spatial;

vec3 test(const float t) {
	return vec3(1, 0, 0);
}

void fragment() {
	test(0.9); // ERROR LINE
}

Also added const parameter processing to gles3 shader compiler.

@Chaosus Chaosus merged commit b452005 into godotengine:master Nov 19, 2021
@Chaosus Chaosus deleted the shader_fix_const_arg branch November 19, 2021 11:04
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.

2 participants