pepsi18 Posted April 12, 2015 Share Posted April 12, 2015 as I can achieve this effect I tried this but it does not work texture ScreenTexture; float Angle = 0; // Defines the blurring direction float BlurAmount = 0.005; // Defines the blurring magnitude sampler ImageSampler = sampler_state { Texture = ; }; float4 main( float2 uv : TEXCOORD) : COLOR { float4 output = 0; // Defines the output color of a pixel float2 offset; // Defines the blurring direction as a direction vector int count = 24; // Defines the number of blurring iterations //First compute a direction vector which defines the direction of blurring. // This is done using the sincos instruction and the Angle input parameter, // and the result is stored in the offset variable. This vector is of unit // length. Multiply this unit vector by BlurAmount to adjust its length to // reflect the blurring magnitude. sincos(Angle, offset.y, offset.x); offset *= BlurAmount; // To generate the blurred image, we // generate multiple copies of the input image, shifted // according to the blurring direction vector, and then sum // them all up to get the final image. for(int i=0; i) { output += tex2D(ImageSampler, uv - offset * i); } output /= count; // Normalize the color return output; }; technique MotionBlur { pass P1 { PixelShader = compile ps_2_0 main(); } } Link to comment
xXMADEXx Posted April 12, 2015 Share Posted April 12, 2015 What did you put for the Lua script? Link to comment
roddydennvor Posted April 12, 2015 Share Posted April 12, 2015 Yeah !! This is great idea,,, so when people get injured then this script work :D Link to comment
-.Paradox.- Posted April 12, 2015 Share Posted April 12, 2015 Yeah !! This is great idea,,, so when people get injured then this script work :D He meant post your code so we can see what's wrong... Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now