Skip to content

Post Shaders

MehVahdJukaar edited this page Jul 25, 2026 · 1 revision

Post Shaders

Toggle vanilla style post processing shaders, with several mods able to stack them without fighting.

Vanilla only lets one post effect be active, whatever set it last wins. PostShadersHelper puts each effect in a group with an order, so contact lenses and a fisheye binocular effect can both be on and always apply in the same sequence.

Getting Started

Declare a group per effect kind, with a priority. Lower applies first:

private static final PostShadersHelper.Group LENSES = new PostShadersHelper.Group(MyMod.res("contact_lenses"), 0);
private static final PostShadersHelper.Group BINOCULAR = new PostShadersHelper.Group(MyMod.res("binocular_effect"), 10);

private static final ResourceLocation LENS_POST = MyMod.res("shaders/post/colored_contact.json");

Then toggle from a client tick. Passing null clears that group:

PostShadersHelper.toggleEffect(hasLenses ? LENS_POST : null, LENSES);

The shader json is a normal vanilla post chain file, so anything that works in assets/minecraft/shaders/post/ works here.

Example: PostShadersExample

Core shaders

CoreShaderContainer holds a core shader registered with ClientHelper.addShaderRegistration, so you can use it in a RenderType without worrying about load order.

Iris is handled: Moonlight detects it and keeps the effects working with shaderpacks where possible.

Clone this wiki locally