Portaldistancenear (Material global keyword)

The information on this page is specific to Quake 4 .


Controls when to start closing a visportal .


In the global section of your material shader type…

portaldistancenear [float]


  • [float] - the distance from the player in game units at which point the visportal will start to close.


Visportals usually only close in a specific set of circumstances; this keyword overrides that behaviour which can lead to noticeable visual artefacts so choose a distance to minimise it. See also the portalimage and portaldistancefar keywords.