Dither enable  

Parameters:

enable - true to enable dithering, false to disable. Defaults to true.

Description:

Enables or disables hardware dithering.

Hardware dithering is useful when running games in 16-bit colour mode. Due to the fact that 16-bit mode offers less colours than the human eye can distinguish, separate bands of colour are often noticeable on shaded objects. However, hardware dithering will dither the entire screen to give the impression that more colours are being used than is actually the case, and generally looks a lot better.

Due to the fact that 24-bit and 32-bit offer more colours as the human eye can distinguish, hardware dithering is made pretty much redundant in those modes.

Example:

; Dither Example
; --------------

Graphics3D 640,480,16
SetBuffer BackBuffer()

camera=CreateCamera()
light=CreateLight()

; Rotate light so that it creates maximum shading effect on sphere
RotateEntity light,90,0,0

sphere=CreateSphere( 32 )
PositionEntity sphere,0,0,2

While Not KeyDown( 1 )

; Toggle dither enable value between true and false when spacebar is pressed
If KeyHit( 57 )=True Then enable=1-enable

; Enable/disable hardware dithering
Dither enable

RenderWorld

Text 0,0,"Press spacebar to toggle between Dither True/False"
If enable=False Then Text 0,20,"Dither False" Else Text 0,20,"Dither True"

Flip

Wend

End

Index