Skip to content

CameraAntiAlias

Narta Xaymar Dirks edited this page Dec 2, 2026 · 1 revision

CameraAntiAlias BlitzLLVM

CameraAntiAlias:Void camera:Int32, mode:Int32
Parameter Mode Type Default Description
camera In Int32 required Camera handle.
mode In Int32 required -1 to do what AntiAlias says (the default), 0 for none, 1 for SMAA, 2 for SMAA T2x. Any value above 2 is 2, and below -1 is -1.

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

Sets what AntiAlias does for one camera, so that only the cameras that need smoothing pay for it. SMAA costs a few passes over the area of every camera, and a camera that draws a HUD, a minimap or flat shapes does not need it; or AntiAlias stays off and only the camera of the world gets it. This is a BlitzLLVM extension.

A camera starts with -1, which does what AntiAlias says. 0 leaves the picture of the camera as it was drawn even with AntiAlias on, 1 smooths it with SMAA and 2 with SMAA T2x even with AntiAlias off. As for AntiAlias, 2 is 1 when the camera does not draw to the BackBuffer. Everything else is as described for AntiAlias: only the part of the buffer that the camera draws to is smoothed, right after the camera was drawn.

A camera that is never smoothed does not use the memory of SMAA. The memory that is kept free for it in advance goes by the most that AntiAlias or any camera asked for.

Examples

Graphics3D 640, 480, 0, 2
SetBuffer BackBuffer()
AntiAlias 1

camera = CreateCamera()
PositionEntity camera, 0, 0, -4
cube = CreateCube()
TurnEntity cube, 20, 30, 0

; A HUD camera on top that only draws flat sprites: no need to smooth it.
hud = CreateCamera()
CameraClsMode hud, False, True
CameraAntiAlias hud, 0
EntityOrder hud, -1

While Not KeyHit(1)
	TurnEntity cube, 0, 0.3, 0
	RenderWorld
	Flip
Wend

Related Commands

CameraClsColor Blitz3D, CameraClsMode Blitz3D, CameraCulling BlitzLLVM, CameraCullingSource BlitzLLVM, CameraDither BlitzLLVM, CameraFogColor Blitz3D, CameraFogMode Blitz3D, CameraFogRange Blitz3D

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally