Mogre and compositors

crodude

28-12-2006 14:19:08

Hi!
Have anyone here tried to use compsitors with Mogre.
I'm trying to put the bloom and hdr in use, but can't quite get it from the c++
examples from the ogre to translate it into mogre/c#.

Any help, example ... please.

Thanks,
D.

crodude

28-12-2006 16:58:39

Ok, I've found the way to enable the compositor from the script like this:

Mogre.CompositorInstance comp = Mogre.CompositorManager.Singleton.AddCompositor(this.gameCamera.Viewport, "Bloom");
Mogre.CompositorManager.Singleton.SetCompositorEnabled(this.gameCamera.Viewport, "Bloom", true);

But can't find the way to tweak the parameters. I supposed that I could get the param list through Compositor.GetParameters().

Something like this:
Mogre.Const_ParameterList pList = comp.Compositor.GetParameters();
int count = pList.Count;

But list is empty.
Any advice?

Bekas

28-12-2006 23:38:54

You mean the parameters for the fragment program like this ? :
comp.Technique.GetTargetPass(0).GetPass(0).GetMaterial().GetTechnique(0).GetPass(0).GetFragmentProgramParameters().SetNamedConstant("param", val);
This is just a guess, I'm not sure if bloom has parameters to tweak. If you can find a c++ sample I'll be glad to help you to convert it.