Skip to content

Cel shading shader: Switch to regular shader parameters#2163

Closed
manuq wants to merge 1 commit into
mainfrom
townies-material
Closed

Cel shading shader: Switch to regular shader parameters#2163
manuq wants to merge 1 commit into
mainfrom
townies-material

Conversation

@manuq
Copy link
Copy Markdown
Collaborator

@manuq manuq commented May 6, 2026

Do not rely on instance shader parameters for recoloring. Instead, make the material unique when a different recolor is needed. For instance, by duplicating the cel_shading_recolor_material.tres.

@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 14, 2026

I had to refresh in my mind what I was attempting here. It seems to work now, I will clean and put it for review tomorrow!

@manuq manuq force-pushed the townies-material branch 3 times, most recently from 89bedfa to 86b9852 Compare May 15, 2026 15:18
@manuq manuq marked this pull request as ready for review May 15, 2026 15:20
@manuq manuq requested a review from a team as a code owner May 15, 2026 15:20
@manuq
Copy link
Copy Markdown
Collaborator Author

manuq commented May 15, 2026

Ready for review. This one was tricky, but is a first step towards a more generic palette swap (hair, clothes).

Do not rely on instance shader parameters for recoloring. Instead, make the
material unique when a different recolor is needed. For instance, by duplicating
the cel_shading_recolor_material.tres.

Now the way to have the same recoloring in multiple sprites is to share the same
material.

Townie: have a duplicate copy of the cel shading recolor material. Apply it to all
the parts.
@@ -1,9 +1,10 @@
[gd_scene format=3 uid="uid://dgrrudegturnw"]

[ext_resource type="Material" uid="uid://b7kf0suo0sc7k" path="res://scenes/game_elements/components/cel_shading_recolor_material.tres" id="1_nj51j"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is still set as the material property on the root node. I'm a little confused with how this interacts with the shader_material custom property.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In #2143 we removed both the material from the root node, and the shader_material from the character randomizer script.

@wjt
Copy link
Copy Markdown
Member

wjt commented May 19, 2026

Merged as part of #2143.

@wjt wjt closed this May 19, 2026
@wjt wjt deleted the townies-material branch May 19, 2026 14:43
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.

2 participants