Summary
Allow StandardMaterial to use alpha blending and opacity dithering at the same time, each driven by its own independent intensity, rather than sharing the single opacity property and being treated as mutually exclusive techniques.
Current behavior
Transparency in StandardMaterial is controlled by:
opacity (0..1) — a single scalar that feeds whichever technique is active
blendType — e.g. BLEND_NORMAL, BLEND_ADDITIVE, …
opacityDither — DITHER_NONE | DITHER_BAYER8 | DITHER_BLUENOISE | DITHER_IGNNOISE
In practice these are an either/or choice: a material can be either alpha-blended or dithered, with the same opacity scalar driving whichever one is active. There is no way to mix both with different strengths.
Motivation / Use cases
We use opacity dithering to fade out objects as they get close to the camera, which prevents them from visibly clipping. This works well for opaque materials, but breaks down for transparent ones: a glass pane with opacity = 0.5 already relies on alpha blending to look like glass, so forcing it through the dither path to handle the camera-proximity fade replaces the smooth glass look with a permanent dithered pattern.
With independent intensities for blending and dithering, the glass could keep its alpha-blended appearance at its normal viewing distance and only have the dither intensity ramp up as the camera approaches — fading the object out without ever losing the underlying transparent look.
Summary
Allow
StandardMaterialto use alpha blending and opacity dithering at the same time, each driven by its own independent intensity, rather than sharing the singleopacityproperty and being treated as mutually exclusive techniques.Current behavior
Transparency in
StandardMaterialis controlled by:opacity(0..1) — a single scalar that feeds whichever technique is activeblendType— e.g.BLEND_NORMAL,BLEND_ADDITIVE, …opacityDither—DITHER_NONE | DITHER_BAYER8 | DITHER_BLUENOISE | DITHER_IGNNOISEIn practice these are an either/or choice: a material can be either alpha-blended or dithered, with the same
opacityscalar driving whichever one is active. There is no way to mix both with different strengths.Motivation / Use cases
We use opacity dithering to fade out objects as they get close to the camera, which prevents them from visibly clipping. This works well for opaque materials, but breaks down for transparent ones: a glass pane with opacity = 0.5 already relies on alpha blending to look like glass, so forcing it through the dither path to handle the camera-proximity fade replaces the smooth glass look with a permanent dithered pattern.
With independent intensities for blending and dithering, the glass could keep its alpha-blended appearance at its normal viewing distance and only have the dither intensity ramp up as the camera approaches — fading the object out without ever losing the underlying transparent look.