ShadowQuality
Shadow detail, 0 (fast) to 3 (best).
ShadowQuality level
Parameters
- level
- shadow detail, from 0 to 3:
- 0: fastest - small shadow maps with hard edges
- 1: low - soft edges
- 2: medium (default)
- 3: best - large shadow maps with the softest edges
Description
Sets the detail of every shadow in the world.
Higher levels give sharper, smoother shadows but take more graphics memory and time to draw. Level 2 suits most desktop games; level 0 or 1 is a good choice for phones and tablets.
ShadowQuality only matters once a light casts shadows - see LightShadows.
Example
; Shadows example (an ArcBasic extension); S toggles shadows, Q changes the shadow quality, Escape quitsGraphics3D 640,480SetBuffer BackBuffer()camera=CreateCamera()PositionEntity camera,0,6,-12TurnEntity camera,25,0,0AmbientLight 70,70,80; the sun: a directional light, pointing down at an anglesun=CreateLight(1)RotateEntity sun,50,30,0LightShadows sunground=CreatePlane()EntityColor ground,120,160,120cube=CreateCube()PositionEntity cube,-2,1,0EntityColor cube,200,80,80ball=CreateSphere(16)PositionEntity ball,2,1.5,1EntityColor ball,80,120,220; this cube neither casts nor receives shadowsghost=CreateCube()PositionEntity ghost,0,1,3EntityColor ghost,240,240,120EntityShadows ghost,False,Falseshadows=Truequality=2While Not KeyDown(1) If KeyHit(31) ; S shadows=Not shadows LightShadows sun,shadows EndIf If KeyHit(16) ; Q quality=(quality+1) Mod 4 ShadowQuality quality EndIf TurnEntity cube,0,1,0 RenderWorld Text 0,0,"Shadows: "+shadows+" Quality: "+quality+" (S / Q)" FlipWendEnd
