Old Cube Mapping Bug

Blitz3D Forums/Blitz3D Bug Reports/Old Cube Mapping Bug

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Kinda hoped this had been fixed, but apparently not judging from a couple of emails I've received. Cube maps on any layer but layer zero seem to do odd things ( like making the object utterly invisible ) on a few videocards. I can't test this personally, so if anyone who ever had problems with invisible balls in either Kick Shot Pool or Anime Bowling Babes could test this that'd be great.

In keeping with the more focussed bug forum these days, please don't let's have a list of 100 "works fine here"'s. I know it works fine for a lot of people, it works fine for me too. It seems to have problems on some Intel's and some ATI radeons and mobility's.

You'll need a texture map and a cube map. Use your own or use mine :





Press 1 and 2 to move the cubemap between layers. In theory, it should look exactly the same regardless of which key you press. That's how it is for me. Anyone who gets weird behaviour, particularly the ball disappearing when you press 2, please indicate.



; CUBE MAP TEST 1 - SHOULD WORK ON ANY CARD WHICH SUPPORTS CUBE MAPS

Graphics3D 640,480,0
SetBuffer BackBuffer()


If GfxDriverCaps3D()<110

	EndGraphics
	RuntimeError "YOUR CARD IS REPORTING IT CANNOT DO CUBEMAPS. THIS IS NOT A BUG, IT IS DESIRED BEHAVIOUR"
	
Else
		
	Camera=CreateCamera()
	PositionEntity Camera,0,2,0
	Light=CreateLight()
	
	Ball=CreateSphere(16)
	PositionEntity Ball,0,0,4
	CubeTex=LoadTexture("cube.png",1+8+64)
	Tex=LoadTexture("ball.png",1+8+16+32)
	
	SetCubeMode CubeTex,1
	
	TextureBlend CubeTex,3
	TextureBlend Tex,1

	EntityTexture Ball,Tex,0,0	
	EntityTexture Ball,CubeTex,0,1

	Pivot=CreatePivot()
	PositionEntity Pivot,0,0,4
	EntityParent Camera,Pivot
	
	message$="STARTED"
	Color 255,255,255
	
	
	While KeyHit(1)=0
	
		If KeyHit(2)
			
			EntityTexture Ball,Tex,0,1
			EntityTexture Ball,CubeTex,0,0
			
			TextureBlend CubeTex,1
			TextureBlend Tex,3
			
			Message$="CUBE MAP ON LAYER 0"
			
		End If
		
		If KeyHit(3)
			
			EntityTexture Ball,Tex,0,0
			EntityTexture Ball,CubeTex,0,1
			
			TextureBlend CubeTex,3
			TextureBlend Tex,1
			
			Message$="CUBE MAP ON LAYER 1"
			
		End If

	
		TurnEntity Pivot,0,-1,0
		PointEntity Camera,Pivot
		
		UpdateWorld
		RenderWorld
		
		Text 0,0,Message$
		
		Flip
		
		
		
	Wend

End If