Antialiasing

Blitz3D Forums/Blitz3D Beginners Area/Antialiasing

Here is some basic code to use if the object that needs blurring is small and doesnt have a complex texture :)
I know this is ridiculously pixelated but thats the point right?

Graphics3D 640,480,0,2
Graphics3D 320,240,0,3     ;comment this out if you want to see it at normal resolutions :)
cam = CreateCamera()
MoveEntity cam, 0,0,-10

cube = CreateCube()
cube2 = CopyMesh(cube)
cube3 = CopyMesh(cube)
EntityParent cube2, cube
EntityParent cube3, cube
EntityAlpha cube2,.5
EntityAlpha cube3,.25
ScaleEntity cube2,1.02,1.02,1.02
ScaleEntity cube3,1.04,1.04,1.04


lit = CreateLight()
TurnEntity lit, 90,0,0

hide = True
While Not KeyDown(1)
Cls

TurnEntity cube,1,1,0

If KeyHit(57) Then hide = Not hide

If hide = True Then
HideEntity cube3
HideEntity cube2
Else
ShowEntity cube2
ShowEntity cube3
EndIf


UpdateWorld()
RenderWorld()

Text 1,1, "PRESS THE SPACEBAR TO TOGGLE BETWEEN SHARP EDGES AND BLURRY EDGES."

If HIDE Then Text 1,20,"Sharp Edges"
If Not hide Then Text 1,20,"Blurry Edges"
Delay 20
Flip
Wend