WorldShadows()

Syntax

WorldShadows(Type [, Distance.f [, Color [, TextureSize]]])
Description
Sets how shadows will be rendered in the world.

Parameters

Type Type can be one of the following values:
  #PB_Shadow_None      : No shadows will be displayed in the world. This can save a lot of CPU
                         power if shadows aren't needed (default)
  #PB_Shadow_Modulative: shadows will be displayed for entities that have the cast
                         shadow set with EntityRenderMode() and #PB_Entity_CastShadow.
                         This shadow mode is the fastest available, but is not very good-looking as the shadows are not translucent.
  #PB_Shadow_Additive  : shadows will be displayed for the entities which have the cast
                         shadow set with EntityRenderMode() and #PB_Entity_CastShadow.
                         This mode is slower than the modulative mode, but it looks much better as the shadows are translucent. 
                         Also if some shadows overlap, the shadows will be added resulting in a more realistic darker result.
  #PB_Shadow_TextureAdditive: shadows will be displayed for the entities which have the cast
                         shadow set with EntityRenderMode() and #PB_Entity_CastShadow. This mode
                         is average in speed and quality between modulative and additive shadow, and will work even with water.
  #PB_Shadow_TextureModulative: shadows will be displayed for the entities which have the cast
                         shadow set with EntityRenderMode() and #PB_Entity_CastShadow. 
                         This shadow mode is the faster than #PB_Shadow_TextureAdditive but is not very good-looking as the shadows are not translucent.
Distance (optional) Maximum distance from the camera, in world unit, above which the shadows won't be calculated anymore.
Color (optional) Color of the shadows. RGB() can be used to get a valid Color value.
TextureSize (optional) Pixel size of the texture used to render the shadow. The bigger it is it, the better the shadow will be looking, but the slower it will be. The default value is 512, and this value shouldn't be bigger than 4096.

Return value

None.

Supported OS

All

<- WorldGravity() - Engine3D Index - Yaw() ->