; Dither Example ; -------------- ; Dithering matters most in 16-bit colour, where smooth shading shows banding Graphics3D 640,480,16,2 SetBuffer BackBuffer() camera=CreateCamera() ; Light the sphere from above for the strongest shading gradient light=CreateLight() RotateEntity light,90,0,0 ; A big smooth sphere - colour banding shows up in its shaded gradient sphere=CreateSphere(32) PositionEntity sphere,0,0,2 enable=1 While Not KeyDown(1) ; Space toggles hardware dithering If KeyHit(57) Then enable=1-enable ; Enable or disable hardware dithering Dither enable TurnEntity sphere,0,0.5,0 RenderWorld Text 0,0,"Space: toggle dithering Esc: exit" If enable Then Text 0,20,"Dither True" Else Text 0,20,"Dither False" Text 0,40,"Look for colour banding in the sphere's shading (16-bit modes)" Flip Wend End