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 using stage functions inside custom shader functions #93650

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Jun 27, 2024

This is to allow SDF functions (in canvas_item) as well as emit_particle (in particle shaders) to be used in custom shader functions. Closes godotengine/godot-proposals#10047

@Chaosus Chaosus requested a review from a team as a code owner June 27, 2024 07:26
@Chaosus Chaosus added this to the 4.x milestone Jun 27, 2024
@Chaosus Chaosus force-pushed the shader_stage_custom_funcs branch 6 times, most recently from 643e8d7 to aaec0c5 Compare June 27, 2024 10:16
@Chaosus Chaosus modified the milestones: 4.x, 4.4 Jul 17, 2024
@Chaosus Chaosus requested a review from Calinou July 18, 2024 20:32
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 (rebased on top of master 44fa552), it works as expected.

Previously, this shader would have failed compilation:

shader_type particles;

void create_particles() {
	emit_subparticle(mat4(1.0), vec3(1.0), vec4(1.0), vec4(1.0), uint(0));
}

void process() {
	create_particles();
}

@Chaosus Chaosus merged commit 03641a4 into godotengine:master Oct 24, 2024
20 checks passed
@Chaosus Chaosus deleted the shader_stage_custom_funcs branch October 24, 2024 06:32
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