-
Notifications
You must be signed in to change notification settings - Fork 7
How To: Choosing the Right Layer(s)
grondag edited this page Jun 13, 2019
·
20 revisions
Normally, the texture blending mode (solid, cutout, cutout-mipped or translucent) is determined for the entire model by the type of block. JMX, thanks to the Fabric Rendering API, allows every quad to be assigned a different "layer" that overrides the block-level mode.
Developer Notes: In the Fabric view of the Minecraft source code, what JMX calls "layer" is known as
BlockRenderLayer. In the Rendering API it is set viaMaterialFinder.blendMode().
JMX also enables faces with two sprites and each sprite can have a different layer. This is often useful for overlay and partial emissive effects. More information on this feature is available here.
Minecraft offers four layers to choose from, described in the table below.
| Layer | Alpha Channel Meaning | Use For |
|---|---|---|
solid |
Ignored | Blocks or quads that are fully opaque, with no holes or translucency. |
cutout |
Sprite pixels with alpha < 0.5 are not rendered. ("cut out") | Description goes here |
cutout_mipped |
Sprite pixels with alpha < 0.5 are not rendered. ("cut out") | Description goes here |
translucent |
Sprite pixels are blended with background to appear translucent. Alpha = 0 is invisible, and alpha = 1 appears fully opaque solid, with values in between appearing more or less opaque. | Description goes here |