-
Notifications
You must be signed in to change notification settings - Fork 0
08‐1. Shader Effects I
The ShaderFX engine allows trigger screen shaders and post-processing filters through datapack events based on combat context.
💡 What's New in v2.2: I have completely deprecated the old, complex & redundant "Shader Packets Parameters" system. In the modern version, it's more understandable and redundant entries have been eliminated. The system now operates with sealed records, allowing for more efficient shader addition, since previously compatibility with a centralized record was forced. Additionally, the Shader loader now operates as a Coroutine and not as a tickable event, this eliminates various bugs, such as retaining visual effects while active and exiting the world (if it was of the holdable type).
Place your configuration files here:
assets/<namespace>/shader_packet/*.json
| Field | Description | Valid Options |
|---|---|---|
| category | Target weapon category (Required). | e.g., epicfight:sword |
| trigger_item | Targeted item id. Defaults to all if missing. | "all" or "modid:item_id" |
| activation_type | The root gameplay trigger context. | "Skill", "Style", "Animation" |
| effect | The effect in question with its respective data. | All shaders |
- Skill ➡️ When a skill is active, primarily of the time type for Weapon Innate (Like Longsword).
- Style ➡️ As long as the configured style is the same as the one that holds the item.
- Animation ➡️ At the moment an animation is executed.
Supported in: Skill (Hold), Style (Hold) Parameters:
- time_in (Fade-in)
- time_out (Fade-out)
- intensity
- Color (R, G, B Integer)
In this example, the Soul Render weapon, upon entering its special state, causes a color overlay or dye (to be precise) to be added.
{
"shader_packet": [
{
"category": "antitheus",
"trigger_item": "simplyswords:soulrender",
"activation_type": "style",
"effect": {
"style": "ochs",
"color_overlay": {
"time_in": 82,
"time_out": 70,
"intensity": 0.65,
"color": [189, 85, 10]
}
}
}
]
}2026-06-17.21-21-05.mp4
Supported in: Skill (Hold), Style (Hold) Parameters:
- time_in
- time_out
- intensity (non-scalar)
- samples (Quality vs Performance trade-off).
When sheathing the katana, the blur effect is activated upon entering the "sheat" state, creating a focusing effect; things at the edges become softly blurred, as if one were in focus.
{
"shader_packet": [
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "style",
"effect": {
"style": "sheath",
"radial_blur_in": {
"time_in": 25,
"time_out": 14,
"intensity": 0.015,
"samples": 15
}
}
}
]
}2026-06-18.15-59-34.mp4
Supported in: Animation (Oneshot)
Parameters:
- time_hold (Duration)
- size (Texture resolution mapping)
- intensity
- color (R, G, B Integer)
In this example, when a cut is executed, the screen experiences a slight white glow; the effect is not deterministic, therefore, it is different each time it is executed, as it is "noise".
{
"shader_packet": [
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "animation",
"effect": {
"animation": "epicfight:biped/skill/battojutsu",
"elapse": 0.95,
"noise_overlay": {
"time_hold": 20,
"intensity": 10.0,
"scale": 2.0,
"color": [255, 255, 255]
}
}
}
]
}2026-06-18.16-10-14.mp4
Supported in: Animation (Oneshot)
Parameters:
- radius (Accepts 0 to 20. Setting to 0 disables effect).
- intensity (Visual strength).
- atlook (Boolean. If true, the effect only triggers if the player camera is actively facing the target source).
- useaberration (Boolean. If true, the effect triggers with chromatic aberration).
In this case, when executing an animation and special ability of the Napoleon weapon, from the Weapons of Miracle mod, we fire a shader + aberration.
{
"shader_packet": [
{
"category": "napoleon",
"trigger_item": "wom:napoleon",
"activation_type": "animation",
"effect": {
"animation": "wom:biped/skill/napoleon_verdun",
"elapse": 0.95,
"impact_frame": {
"radius": 20,
"intensity": 1,
"atLook": false,
"useAberration": true
}
}
}
]
}impact_frame_v3-aberration_on.mp4
Supported in: Animation (Hold)
Parameters:
- time_in
- time_out
- intensity
In this example, entering the weapon stance applies a chromatic aberration effect. Colors slightly separate at the screen edges, producing a distorted.
{
"shader_packet": [
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "style",
"effect": {
"style": "sheath",
"chromatic_aberration": {
"time_in": 20,
"time_out": 15,
"intensity": 0.35
}
}
}
]
}2026-06-18.16-02-04.mp4
Supported in: Animation (Hold)
Parameters:
- time_in
- time_out
- intensity
- radius
In this example, entering the weapon stance applies a chromatic aberration effect. Colors slightly separate at the screen edges, producing a distorted, However, this distortion only occurs within a certain radius that starts from the edges towards the center.
{
"shader_packet": [
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "style",
"effect": {
"style": "sheath",
"advanced_chromatic_aberration": {
"time_in": 20,
"time_out": 15,
"intensity": 0.35,
"radius": 0.8
}
}
}
]
}2026-06-20.18-05-30.mp4
Besides dedicated animation effects such as Noise Overlay and Impact Frame, animations can also trigger temporary versions of standard screen shaders.
These effects execute once when the animation reaches the configured elapsed time and remain active for the specified hold duration.
Supported effects:
- color_overlay
- radial_blur_in
- radial_blur_out
- aberration
- advanced aberration
Required parameters:
| Parameter | Description |
|---|---|
| time_in | Fade-in duration |
| time_hold | Time the effect remains active |
| time_out | Fade-out duration |
| intensity | Effect strength |
| radius | (If applicable) It is the range from the edge of the screen towards the center |
In this example, when running the respective animation, we accompany it with a small timed chromatic aberration effect; instead of being infinite while a condition is true, this can also be triggered temporarily for X amount of time.
{
"shader_packet": [
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "animation",
"effect": {
"animation": "epicfight:biped/skill/battojutsu",
"elapse": 0.95,
"chromatic_aberration": {
"time_in": 0,
"time_hold": 20,
"time_out": 10,
"intensity": 0.5
}
}
}
]
}2026-06-20.18-10-45.mp4
Furthermore, the effects are not "unique"; the same category and/or items can trigger several shaders at the same time. In this example, executing the "battojutsu" animation will execute 2 shaders, while with its dash version ("battojutsu_dash"), we will execute another 2.
{
"shader_packet": [
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "animation",
"effect": {
"animation": "epicfight:biped/skill/battojutsu",
"elapse": 0.95,
"noise_overlay": {
"time_hold": 20,
"intensity": 10.0,
"scale": 2.0,
"color": [255, 255, 255]
}
}
},
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "animation",
"effect": {
"animation": "epicfight:biped/skill/battojutsu",
"elapse": 0.95,
"chromatic_aberration": {
"time_in": 0,
"time_hold": 20,
"time_out": 10,
"intensity": 0.5
}
}
},
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "animation",
"effect": {
"animation": "epicfight:biped/skill/battojutsu_dash",
"elapse": 0.55,
"noise_overlay": {
"time_hold": 20,
"intensity": 10.0,
"scale": 2.0,
"color": [255, 255, 200]
}
}
},
{
"category": "uchigatana",
"trigger_item": "epicfight:uchigatana",
"activation_type": "animation",
"effect": {
"animation": "epicfight:biped/skill/battojutsu_dash",
"elapse": 0.15,
"radial_blur_in": {
"time_in": 8,
"time_hold": 20,
"time_out": 8,
"intensity": 0.1,
"samples": 15
}
}
}
]
}2026-06-20.18-23-38.mp4
When the specified animation reaches the configured elapsed time:
- The overlay fades in during timein.
- Remains active for hold.
- Fades out during timeout.
- Automatically cleans itself once finished.
Any incorrect values, or potential errors, will be displayed in the Log; a crash will no longer occur as in past versions, your shader simply won't do anything!