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
}
}
}