Z-buffer Accuracy in 16 bit.

Blitz3D Forums/Blitz3D Programming/Z-buffer Accuracy in 16 bit.

Here's a little of example of the effect.
The restricted camera range seems to work.

Use the up arrow key to bring the sphere out of the cube.

Graphics3D 800, 600, 16, 1
AmbientLight 255,255,255

c = CreateCube()
ScaleEntity c, 5,5,5
EntityColor c, 100, 20, 100

s = CreateSphere(12)
EntityColor s, 255, 255, 0
PositionEntity s, 0, 3.99, 0

cam = CreateCamera()
PositionEntity cam, 0, 10, -10
TurnEntity cam, 25,0,0

CameraZoom cam, 5

; Try again with small range, far/near = 16/4 = 4.

; CameraRange cam, 4, 16

Repeat
	RenderWorld
	Flip
	If KeyDown(200) Then MoveEntity s, 0,  .001, 0  ; up arrow
	If KeyDown(208) Then MoveEntity s, 0, -.001, 0  ; down	
Until KeyDown(1)