What Material Files Do (and the RenderDragon Catch)
In Minecraft Bedrock, a material is not a texture. Instead, it is a set of instructions for the graphics pipeline that dictates how a texture is drawn onto a geometry mesh. Materials decide whether transparent pixels are discarded or blended smoothly, whether the inside of a cube is invisible, and how lighting affects the surface.
Before the RenderDragon engine update, `.material` files could point to custom GLSL or HLSL shader files. In modern Bedrock, custom shaders in resource packs are no longer loaded by the game. However, `.material` files remain fully functional and necessary for configuring fixed-function render states, blend factors, and inheritance from vanilla base materials.
File Location and Structure
Material files live in the `RP/materials/` directory of your resource pack. The most common file to create or override is `RP/materials/entity.material`. Unlike most newer Bedrock JSON files, material files do not use a `format_version` key. Instead, everything is wrapped in a root `materials` object containing a `version` string set to `1.0.0`.
Material definitions rely heavily on inheritance. Rather than writing every shader path and vertex attribute from scratch, you almost always inherit from an existing vanilla material using the colon (`:`) syntax. The key before the colon is your new material name, and the key after the colon is the parent material it copies from.
{
"materials": {
"version": "1.0.0",
"custom_ghost:entity_alphablend": {
"-states": [
"DisableCulling"
],
"+states": [
"Blending",
"DisableDepthWrite"
],
"blendSrc": "SourceAlpha",
"blendDst": "One"
},
"custom_glowing_eyes:entity_emissive_alpha": {
"+states": [
"DisableCulling"
]
}
}
}Vanilla Base Materials to Inherit From
When creating a custom material in `entity.material`, choosing the right parent saves you from fighting the rendering engine. Vanilla defines dozens of base materials, each compiled with specific internal shader flags (`+defines`). Because custom defines can fail if a pre-compiled shader permutation does not exist in the engine, picking a base material that already has the lighting and alpha behavior you want is the safest approach.
The table below lists the standard vanilla entity materials you will most frequently use as parents or assign directly in your client entity definitions.
| Base Material Identifier | What it does | Notes |
|---|---|---|
| entity | Renders a completely opaque surface. | Ignores the alpha channel of your texture completely. |
| entity_alphatest | Hard-edge transparency (cutout). | Pixels are either 100% visible or 100% invisible. Good for hair, leaves, and tattered cloth. |
| entity_alphablend | Smooth, partial transparency. | Supports semi-transparent pixels like stained glass or ghosts. Can cause depth-sorting glitches if layered. |
| entity_emissive | Opaque surface with glowing parts. | Uses the texture's alpha channel as an illumination map. Transparent pixels glow in the dark instead of becoming invisible. |
| entity_emissive_alpha | Cutout transparency with glowing parts. | Combines alpha testing and emissive lighting. Fully transparent pixels are invisible; partially transparent pixels glow. |
| entity_nocull | Opaque surface drawn on both sides. | Disables backface culling so the inside of flat planes or hollow cubes remains visible. |
Render States and Modifiers
Inside a material definition, you modify how the geometry is drawn by adding or removing render states and defines. The JSON keys use a prefix syntax: `+states` adds a state to whatever the parent material already has, `-states` removes a state inherited from the parent, and `states` (with no prefix) overwrites the parent's state array entirely.
You can also configure how semi-transparent pixels mix with the background colors behind them using `blendSrc` (the incoming pixel from your entity) and `blendDst` (the pixel already drawn on screen). Setting `blendSrc` to `SourceAlpha` and `blendDst` to `One` creates an additive blending effect, which is ideal for magic spells, fire, or holograms.
| Property / State | What it does | Notes |
|---|---|---|
| DisableCulling | State: Draws both front and back faces of polygons. | Use in `+states` when single-plane cubes disappear when viewed from behind. |
| Blending | State: Enables alpha blending in the pipeline. | Required if you are configuring `blendSrc` and `blendDst`. |
| DisableDepthWrite | State: Stops the mesh from writing to the depth buffer. | Essential for semi-transparent shells or auras so they do not accidentally hide body parts inside or behind them. |
| DisableAlphaWrite | State: Prevents modifying the screen's alpha channel. | Often paired with additive blending. |
| InvertCulling | State: Renders only the inside faces of a mesh. | Useful for inverted hull outlines or skybox-style effects. |
| blendSrc / blendDst | Property: Sets the math factor for pixel blending. | Common values: `SourceAlpha`, `OneMinusSrcAlpha`, `One`, `Zero`, `DestColor`. |
Assigning the Material to an Entity
Defining a material in `RP/materials/entity.material` does nothing until an entity actually references it. To use your material, open your entity's client definition file (`RP/entity/*.entity.json`) and declare it in the `description.materials` object. This maps a short name (like `default` or `aura`) to the exact material identifier you wrote in `entity.material` (without the `:parent` suffix).
Finally, a render controller (`RP/render_controllers/*.render_controllers.json`) links that short name to specific bones on your geometry. Using wildcards (`*`), you can apply a standard material to the whole body and override specific bone names with your custom material.
{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "custom:ghost",
"materials": {
"default": "custom_ghost",
"eyes": "custom_glowing_eyes"
},
"textures": {
"default": "textures/entity/ghost"
},
"geometry": {
"default": "geometry.custom_ghost"
},
"render_controllers": [
"controller.render.custom_ghost"
]
}
}
}Which versions this applies to
Applies to all modern Bedrock versions (1.16.200+ with RenderDragon). No experimental toggles are required to use custom `.material` configurations, though custom shader code paths (`vertexShader`, `fragmentShader`) are ignored by the RenderDragon engine.
When it does not work
| What you see | Why | The fix |
|---|---|---|
| The entity renders completely invisible, or logs show an ' Invalid material' / missing material error in the Content Log. | You either included the parent name when referencing the material in `client_entity` (for example, writing `custom_ghost:entity_alphablend` instead of just `custom_ghost`), or you added a `+defines` flag that does not have a matching pre-compiled shader permutation in RenderDragon. | In your `.entity.json` file, only write the name that comes before the colon. If it still fails, remove any custom `+defines` from your `.material` file and inherit from a closer vanilla base material instead. |
| Parts of the entity's body disappear when viewed through a semi-transparent outer layer (like a ghost's cloak hiding its own legs). | The material uses alpha blending, which still writes to the depth buffer by default. When the outer layer draws first, the engine thinks that pixel is solid and skips drawing the inner body parts behind it. | Add `"DisableDepthWrite"` to the `"+states"` array in your custom material definition so the transparent layer does not block polygons behind it. |
| Transparent areas of the texture render as solid black or solid white, or glow in the dark unexpectedly. | The entity is using `entity` (which ignores alpha) or `entity_emissive` (which treats the alpha channel as glow brightness rather than opacity). | Change the parent material to `entity_alphatest` for hard edges, `entity_alphablend` for smooth transparency, or `entity_emissive_alpha` if you want both cutout transparency and glowing pixels. |
Reference, straight from the game files
Read out of the game itself, so the ids match the version you are building for.
