Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // For each sample, sum up each sample's color in "Blurred" and then divide
- // to average the color after all the samples are added.
- float3 Blurred = 0;
- for(float i = 0; i < NumberOfPostProcessSamples; i++)
- {
- // Sample texture in a new spot based on pixelVelocity vector
- // and average it with the other samples
- float2 lookup = pixelVelocity * i / NumberOfPostProcessSamples + OriginalUV;
- // Lookup the color at this new spot
- float4 Current = tex2D(RenderTargetSampler, lookup);
- // Add it with the other samples
- Blurred += Current.rgb;
- }
Advertisement
Add Comment
Please, Sign In to add comment