Bloom Filter with Custom Material

So I was playing round with shaders today and I need some bloom to get it looking as I want. Fair enough, I go on the wiki, where it clearly says I need to add another technique to my j3md and it should magically work, right?
Turns out not really. Nothing happens with that technique added or not, sadly. I can only get bloom on my object by setting bloom mode to scene, which as we know, messes up other stuff.

The other issue I’m having is that I’d like to use the colors I compute in the main frag shader as the glow color. Is there a way to pass it directly instead of recomputing everything?

My j3md:

MaterialDef Hologram {
    MaterialParameters {
        Color MainColor
        Color RimColor
        Float RimPower
        Float BarSpeed
        Float BarDistance
        Float FlickerSpeed
        Float GlowSpeed
        Float GlowDistance
        Float Alpha
        Float GlitchSpeed
        Float GlitchIntensity
    }

    Technique {
        VertexShader GLSL400 : Shaders/hologram/holo.vert
        FragmentShader GLSL400 : Shaders/hologram/holo.frag
        WorldParameters {
            WorldViewProjectionMatrix
            WorldViewMatrix
            NormalMatrix
            Time
        }
        RenderState {
            Blend Alpha
            FaceCull Off
        }
        Defines {
            HASBARS : BarSpeed
            HASGLOW : GlowSpeed
            HASALPHA : Alpha
            SHOULDFLICKER : FlickerSpeed
            SHOULDGLITCH : GlitchSpeed
            HASRIM : RimColor
        }
    }

    Technique Glow {
        VertexShader GLSL400 : Shaders/hologram/holo.vert
        FragmentShader GLSL400 : Shaders/hologram/holo.frag

        LightMode SinglePass
        Defines {
            HASBARS : BarSpeed
            HASGLOW : GlowSpeed
            HASALPHA : Alpha
            SHOULDFLICKER : FlickerSpeed
            SHOULDGLITCH : GlitchSpeed
            HASRIM : RimColor
        }
    }
}

You only have to set the color object once. It should work when you change the fields/use the setters on the colorrgba object so long as you keep a reference to it.

You got me wrong. I calculate the desired glow color in the main frag shader as a part of regular color computation and I’d like to pass it to the glow technique.

Indeed I did.

Your glow technique is run separately. Think of it like your default technique but your out color from your frag shader in the glow technique is the glow color that will be used. Unfortunately you can not pass a separate out glow color from your default frag to your glow frag. They do run interdependently.

What stuff?

IMO that’s what you need, if the glow color is already the same as the main color.

Well with the scene mode, you can’t decide which objects should have bloom and which shouldn’t so everything usually becomes a blurry mess.