Skip to content

[Particles] Add support for non-unlit materials - #618

Merged
DoubleStyx merged 6 commits into
DoubleStyx:masterfrom
Baplar:particle-non-unlit
Jun 4, 2026
Merged

DoubleStyx merged 6 commits into
DoubleStyx:masterfrom
Baplar:particle-non-unlit

Conversation

@Baplar

@Baplar Baplar commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes the falling leaves in Frog Bog appearing as squares by supporting non-Unlit materials.
For non-Unlit materials, most variant bits are left to 0 except for Texture, Color, and conditionally AlphaClip and VertexColors.
I also added a new fake variant bit SIMPLE_LIT, similar to RENDER_BUFFER, to indicate that the source material is not Unlit and thus should be subject to diffuse lighting.

There are still a few issues with transparency for PBSVertexColor, and I can’t figure it out…

@Baplar
Baplar marked this pull request as draft June 2, 2026 09:52
@Baplar

Baplar commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

The only remaining issue that I have noticed here is that PBS materials set to AlphaBlend render as opaque billboard particles, and I can’t figure out the reason why.

@Baplar Baplar changed the title Add support for non-unlit materials [Particles] Add support for non-unlit materials Jun 2, 2026
Baplar added 3 commits June 2, 2026 17:12
Texture and color always used if available.
Alpha clip only used if requested by the original material.
Simple diffuse lighting computed (on Unity it does not seem affected by
normal maps, metallics or occlusion, so it seems to be enough).
The only remaining issue is that AlphaBlend is not respected on
PBSVertexColor
@Baplar
Baplar force-pushed the particle-non-unlit branch from 70da19e to a38c3aa Compare June 2, 2026 15:12
@Baplar

Baplar commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

Found a way to make it work, not sure how "correct" it is but I couldn’t find counterexamples of particle systems not working with this change.

@Baplar
Baplar marked this pull request as ready for review June 2, 2026 15:13
@DoubleStyx
DoubleStyx merged commit 08f9420 into DoubleStyx:master Jun 4, 2026
7 of 10 checks passed
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