---
title: shadowMapSize
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnlight/shadowmapsize
---

# shadowMapSize

The size of the shadow map image that SceneKit renders when creating shadows.

## Declaration

```swift
var shadowMapSize: CGSize { get set }
```

## Discussion

Discussion SceneKit produces shadows by rendering the silhouettes of scene geometry into a 2D shadow map image and then projecting that image into the rendered scene. A larger shadow map image produces more detailed shadows at a higher cost to rendering performance; a smaller shadow map renders more quickly but results in pixelation at the edges of shadows. The default value is CGSizeZero, specifying that SceneKit chooses a shadow map size automatically.

## See Also

### Managing Shadows Cast by the Light

- [castsShadow](scenekit/scnlight/castsshadow.md)
- [shadowRadius](scenekit/scnlight/shadowradius.md)
- [shadowColor](scenekit/scnlight/shadowcolor.md)
- [shadowSampleCount](scenekit/scnlight/shadowsamplecount.md)
- [shadowMode](scenekit/scnlight/shadowmode.md)
- [SCNShadowMode](scenekit/scnshadowmode.md)
- [shadowBias](scenekit/scnlight/shadowbias.md)
- [orthographicScale](scenekit/scnlight/orthographicscale.md)
- [zFar](scenekit/scnlight/zfar.md)
- [zNear](scenekit/scnlight/znear.md)
