Skip to content

Townies: Apply shader to the group of sprites#2162

Closed
manuq wants to merge 1 commit intomainfrom
townies-palette
Closed

Townies: Apply shader to the group of sprites#2162
manuq wants to merge 1 commit intomainfrom
townies-palette

Conversation

@manuq
Copy link
Copy Markdown
Collaborator

@manuq manuq commented May 6, 2026

Add a CanvasGroup node for applying the same shader to all the canvas nodes at once.

Adapt the shader to the builtin shader of CanvasGroup.

Export properties for passing the root sprite, the one that is traversed to find other nodes to randomize. And another one for passing the single CelShaderRecolor node.

Update the test scene.

Add a CanvasGroup node for applying the same shader to all the canvas nodes at
once.

Adapt the shader to the builtin shader of CanvasGroup.

Export properties for passing the root sprite, the one that is traversed to find
other nodes to randomize. And another one for passing the single
CelShaderRecolor node.

Update the test scene.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Test build no longer available.

@manuq
Copy link
Copy Markdown
Collaborator Author

manuq commented May 6, 2026

I did this just to confirm that the problem in #2143 (comment) is actually because of the CanvasGroup being used, and the way the color is being picked from the screen with:

	vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0);

	if (c.a > 0.0001) {
		c.rgb /= c.a;
	}
Grabacion.de.pantalla.desde.2026-05-06.14-33-30.mp4

@manuq
Copy link
Copy Markdown
Collaborator Author

manuq commented May 6, 2026

In #2163 I will:

  • Switch to regular shader parameters
  • The same material will be shared by all the parts of the townie
  • Each townie will have a unique material (a duplicate of the cel_shading_recolor_material.tres) to have different parameters.

I'll port the current shader (skin only) in #2163. Once that's done I'll do the full palette swap (hair, clothes).

@manuq manuq closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant