'Clean' Sswift Shadow demo?

Blitz3D Forums/Blitz3D Programming/'Clean' Sswift Shadow demo?

"The textures are pre-loaded and won't be overwritten by entitytexture. Strange!"

Try this. EntityTexture is always overridden by a surface texture.

; -------------------------------------------------------------------------------------------------------------------------------------
; This function paints an entity and its children.
; -------------------------------------------------------------------------------------------------------------------------------------
Function RecursivePaintEntity(Entity, Brush)

	Local Child
	Local Surface

	; Paint all surfaces in this mesh.	
	If (EntityClass$(Entity) = "Mesh") Or (EntityClass$(Entity) = "BSP") 
		For Surface = 1 To CountSurfaces(Entity)	
			PaintSurface GetSurface(Entity, Surface), Brush
		Next
	EndIf	
	
	For Child = 1 To CountChildren(Entity)
		RecursivePaintEntity(GetChild(Entity, Child), Brush)
	Next				

End Function