Introduction
The Materials system provides a flexible and extensible framework for handling rendering materials in particle systems.
It offers various material types with different rendering capabilities, from simple textures to complex custom shaders with HDR support and advanced effects:
- Texture Material
- Sprite Material
- Custom Shader Material
Universal Configuration
All materials share the following settings:
Property | Type | Description | Default |
---|---|---|---|
material |
IMaterial |
The specific material implementation | Built-in circle texture |
blendMode |
BlendMode |
Controls how particles blend with the background | - |
cull |
boolean |
Enable/disable face culling | true |
depthTest |
boolean |
Enable/disable depth testing | true |
depthMask |
boolean |
Enable/disable depth buffer writing | false |
Texture Material
is the most common type, designed for texture-based rendering.
It supports custom textures, HDR color processing, pixel-art mode, and more.
This makes it the most versatile material choice in the particle system.
Configuration parameters:
Property | Type | Description |
---|---|---|
Texture |
ResourceLocation |
Path to the texture file |
Discard Threshold |
float |
Alpha discard threshold |
HDR |
Vector4f |
HDR color vector |
HDR Mode |
HDRMode |
HDR blending mode |
Pixel Art.bits |
int |
Pixel art bit depth |
Sprite Material
allows you to access Minecraft’s registered particle textures.
The most powerful material type, allowing you to fully control rendering,
set custom samplers/uniforms, and even access particle data.
In fact, all material types can be implemented via a custom shader.
For more info, see Custom Shader Material.
Special Material: block_atlas
What is the Block Atlas?
See the official wiki: Block Atlas
The built-in block_atlas
material is essentially a Texture Material that lets FX access Minecraft's block atlas texture.
It’s especially useful when rendering particles in model mode with useBlockUV
enabled —
the UVs can directly access the required block textures from the atlas.
You can also pass the block atlas as a sampler in a Custom Shader Material (see the sampler page for details).