Question

Currently, i'm using a saturation effect in my 2D game but i'm very new with HLSL, and pretty lost.

    protected override void LoadContent()
    {
    ...things to load...
        //saturation
        desaturateEffect = Content.Load<Effect>("desaturate");
    }

    protected override void Draw(GameTime gameTime)
    {
        desaturateEffect.Parameters["saturationLevel"].SetValue(1 * Life / LifeMax);
        spriteBatch.Begin(SpriteSortMode.Deferred,
                          BlendState.AlphaBlend,
                          SamplerState.LinearClamp,
                          null,
                          null,
                          desaturateEffect,
                          transform);
        ...things to draw...
        spriteBatch.End();
    }

I think it's a pixel shader, but i don't know if it's a post-processing effect. Can you explain me the difference between post-processing and others ? For example, this effect is applied in the spriteBatch.begin(). For others, where are they applied ?

Second thing, i would like to use a shockwave effect (or ripple effect), is it a post-processing too ?

Hope you can guide me.

Was it helpful?

Solution

Seriously, i'v searched for few days and didn't find anything about this. But almost an hour after posted this topic, i found this which answers my questions...

http://www.stromcode.com/2008/03/09/intro-to-effects-and-post-processing/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top