Custom Post
You can custom own post by writing shader text. For post processing, program first render 3d scene to a texture, then set this rendered texture to all six texture stages (stage0 - stage5); then for every post, apply it's material to draw a 2d screen rectangle cover full viewport.
You can introduce new texture to shader:
first define a texture variable: texture tTX0; then
set it to a stage: Texture[0] = <tTX0>;
You can use vertex shader, the
vertex FVF of screen rectangle is XYZRHW | DIFFUSE | TEX4.
You can get viewport description by the preset
variable:
vector _vecViewport; // viewport description ( vp.X, vp.Y, vp.Width, vp.Height )
The default texture address mode for stage0 is
Clamp, and Wrap for other stages.