Сообщение от Arton
Порталом? Не понял? Поясни.
Но ведь разгрузка на полигоны в кадре есть.
Неужели этот код настолько неэффективен?
|
А что!? не портал что-ли
Function OccludeEntity(CurrentEntity.Entity,Camera)
; Now check if object is occluded or not...
If CurrentEntity\Occluded=False Then ; If entity already is occluded, then skip this...
For OccludeList.Occluder = Each Occluder
; Skip the occluder if it's out of the viewfrustum
If EntityInView(OccludeList\Mesh,Camera)=False Then Goto SkipThisOccluder
EntityHidden=True
For EdgeList.Edge = Each Edge
If OccludeList\ID = EdgeList\Parent Then
If EdgeList\Visible=True Then
If ((EdgeList\PlaneNX#*EntityX#(CurrentEntity\Entity)+EdgeList\PlaneNY#*EntityY#(CurrentEntity\Entity)+EdgeList\PlaneNZ#*EntityZ#(CurrentEntity\Entity))-EdgeList\PlaneDist#+EntityList\Radius#)>-CurrentEntity\Radius# Then
EntityHidden=False
EndIf
EndIf
EndIf
Next
If EntityHidden=True Then
CurrentEntity\Occluded=True
;EntityColor EntityList\Entity,255,0,0
ShowEntity CurrentEntity\Entity
Exit
Else
CurrentEntity\Occluded=False
HideEntity CurrentEntity\Entity
EndIf
.SkipThisOccluder
Next
EndIf
End Function