Thanks GG)) But I mean not the easiest way.
I mean somethting like this:
http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html
My main Idea is to blur final image basing on the camera movement-rotation only.
So I try to convert it:
In DbPro:
view matrix4 AL_Matrix1
projection matrix4 AL_Matrix2
multiply matrix4 AL_Matrix3,AL_Matrix1,AL_Matrix2
r=inverse matrix4(AL_Matrix2,AL_Matrix2)
set effect constant matrix AL_RenderTarget_FinalComp,"ProjInv",AL_Matrix2
//in the end of the loop
view matrix4 AL_Matrix1
projection matrix4 AL_Matrix2
multiply matrix4 AL_Matrix5,AL_Matrix1,AL_Matrix2
set effect constant matrix AL_RenderTarget_FinalComp,"PreviousVP",AL_Matrix5
In shader:
matrix ProjInv;
matrix PreviousVP;
Pixel part:
//depth
float zow = tex2D(GeometrySampler, IN.Tex1).w;
float4 H = float4(IN.Tex1.x*2.0f-1.0f, (1.0f-IN.Tex1.y)*2.0f-1.0f, zow, 1.0f);
float4 D = mul(ProjInv ,H);
float4 pos = D / D.w;
float4 cpos = H;
float4 ppos = mul(PreviousVP , pos);
ppos /= ppos.w;
float2 vel = (cpos.xy-ppos.xy)*0.008f;
float4 color = tex2D(RenderSampler, IN.Tex1);
float2 tuv = IN.Tex1+vel;
for (int i = 1; i < 12; i++) {
float4 ccolor = tex2D(RenderSampler, tuv);
color += ccolor;
tuv += vel;
}
FrameRender = color/12;