Skip to content

feat!: Add alpha support on materials - #4257

Merged
wolfenrain merged 1 commit into
mainfrom
feat/flame_3d-alpha-scissor
Nov 28, 2026
Merged

wolfenrain merged 1 commit into
mainfrom
feat/flame_3d-alpha-scissor

Conversation

@wolfenrain

Copy link
Copy Markdown
Contributor

Description

Adding alpha scissoring to materials.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

By default we now render opaque, before this every draw was using alpha blending. So an unlit material with a transparent texture will now draw opaque until you enable transparency, decided to do this as it should be an opt-in as it has a cost (minor but good defaults is better than slow defualts)

Related Issues

@wolfenrain wolfenrain changed the title feat!: add alpha support on materials Feat!: add alpha support on materials Nov 27, 2026
@wolfenrain wolfenrain changed the title Feat!: add alpha support on materials feat!: add alpha support on materials Nov 27, 2026
@wolfenrain wolfenrain changed the title feat!: add alpha support on materials feat!: Add alpha support on materials Nov 27, 2026

@spydon spydon left a comment

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.

LGTM, one super minor nit.
Also all the var variables look pretty verbose to me, but I think we might have added a rule for that for public vars.

}

/// How a [Material]'s alpha channel is interpreted by the renderer.
enum Transparency() {

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.

Suggested change
enum Transparency() {
enum Transparency {

No need to declare the empty constructor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

😂 honestly why didnt any kind of lint rule flag that!

@wolfenrain wolfenrain Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

image

Reverting this for now, seems to be generating a false positive from the dart analyzer

@wolfenrain
wolfenrain force-pushed the feat/flame_3d-alpha-scissor branch from 9314f83 to 7c6cb52 Compare November 27, 2026 19:51
@wolfenrain
wolfenrain merged commit 1403dad into main Nov 28, 2026
23 of 25 checks passed
@wolfenrain
wolfenrain deleted the feat/flame_3d-alpha-scissor branch November 28, 2026 13: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