-
Notifications
You must be signed in to change notification settings - Fork 0
08‐1. Shader Effects I
The ShaderFX engine allows developers to trigger complex screen shaders and post-processing filters natively 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_parameters/*.json
| Field | Description | Valid Options |
|---|---|---|
| category | Target weapon category (Required). | e.g., epicfight:sword |
| for_item | Targeted item id. Defaults to all if missing. | "all" or "modid:item_id" |
| payload_on | The root gameplay trigger context. | "Skill", "Style", "Animation" |
| type | Execution mode (tied directly to payload_on). | "hold", "oneshot" |
- Skill ➡️ Supports "type": "hold" (Active while skill condition is true).
- Style ➡️ Supports "type": "hold" (Active while stance/style is active).
- Animation ➡️ Supports "type": "oneshot" (Triggers once at an exact elapsed time framework).
Supported in: Skill (Hold), Style (Hold) Parameters:
- timeIn (Fade-in)
- timeHold (Peak duration)
- timeOut (Fade-out)
- intensity
- r, g, b.
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:
- timein
- hold
- timeout
- 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 (Duration)
- size (Texture resolution mapping)
- intensity, r, g, b.
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:
- timein
- timeout
- intensity
In this example, entering the weapon stance applies a chromatic aberration effect. Colors slightly separate at the screen edges, producing a distorted and high-impact visual appearance.
{
"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
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
Required parameters:
| Parameter | Description |
|---|---|
| timein | Fade-in duration |
| hold | Time the effect remains active |
| timeout | Fade-out duration |
| intensity | Effect strength |
{
"shader_packet": [
{
"category": "napoleon",
"for_item": "wom:napoleon",
"payload_on": "animation",
"payload": {
"type": "oneshot",
"run": {
"animation": "wom:biped/skill/napoleon_verdun",
"elapse": 1.0,
"effect": "color_overlay",
"params": {
"timein": 5,
"hold": 20,
"timeout": 15,
"intensity": 0.8,
"r": 255,
"g": 80,
"b": 80
}
}
}
}
]
}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.
Values for intensity scale differently depending on the specific shader selected. Malformed configurations or impossible triggers will cause a client crash.