Motion blur

Blitz3D Forums/Blitz3D Beginners Area/Motion blur

Is there a way to do Motion Blur in B3D?

easiest would be using the fastlibs.com dlls for that purpose. fast and good looking (but not free).

Does anyone know of a free dll?

; ID: 849
; Author: arkon
; Date: 2003-12-08 11:59:35
; Title: Super fast full screen motion blur.
; Description: Super fast full screen motion blur.

Global ark_blur_image, ark_blur_texture, ark_sw, ark_sh

Function CreateBlurImage()
	;Create blur camera
	Local cam = CreateCamera()
	CameraClsMode cam, 0, 0
	CameraRange cam, 0.1, 1.5
	MoveEntity cam, 0, 0, 10000

	ark_sw = GraphicsWidth()
	ark_sh = GraphicsHeight()
	
	
	;Create sprite
	Local spr = CreateMesh(cam)
	Local sf = CreateSurface(spr)
	AddVertex sf, -1, 1, 0, 0, 0
	AddVertex sf, 1, 1, 0, 1, 0
	AddVertex sf, -1, -1, 0, 0, 1
	AddVertex sf, 1, -1, 0, 1, 1
	AddTriangle sf, 0, 1, 2
	AddTriangle sf, 3, 2, 1
	EntityFX spr, 17
	ScaleEntity spr, 1024.0 / Float(ark_sw), 1024.0 / Float(ark_sw), 1
	PositionEntity spr, 0, 0, 1.0001
	EntityOrder spr, -100000
	EntityBlend spr, 1
	ark_blur_image = spr
	
	;Create blur texture
	ark_blur_texture = CreateTexture(1024, 1024, 256)
	EntityTexture spr, ark_blur_texture
End Function

Function UpdateBlur(power#)
	EntityAlpha ark_blur_image, power#
	CopyRect  ark_sw / 2 - 512, ark_sh / 2 - 512, 1024, 1024, 0, 0, BackBuffer(), TextureBuffer(ark_blur_texture)	
End Function


something i had knocking around on my hd. works nicely from what i remember. from the blitzcoder archives an age ago i think.

KingPod

http://www.blitzbasic.com/codearcs/codearcs.php?code=1793

I couldn't get anything to work. :(

@kingpod I got yours to work but I couldn't see any motion blur.