---
title: shadedMaterial()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/shadedmaterial()
---

# shadedMaterial()

Creates a shaded image from a height-field image.

## Declaration

```swift
class func shadedMaterial() -> any CIFilter & CIShadedMaterial
```

## Return Value

Return Value The modified image.

## Discussion

Discussion This method applies the shaded material filter to an image. The effect produces a shaded image from a height-field image. Areas of the height field image that have a darker shaded area produce a stronger effect. You can combine the filter with CIHeightFieldFromMask to produce quick shadings of masks, such as text. The shaded material filter uses the following properties: The following code creates a filter that results in an image containing glossy text by applying the shading image. func shadowMaterial(inputImage: CIImage, shadeImage: CIImage) -> CIImage {     let shadowMaterialFilter = CIFilter.shadedMaterial()     shadowMaterialFilter.inputImage = inputImage     shadowMaterialFilter.shadingImage = shadeImage     shadowMaterialFilter.scale = 10     return shadowMaterialFilter.outputImage! }

## See Also

### Filters

- [blendWithAlphaMask()](coreimage/cifilter-swift.class/blendwithalphamask().md)
- [blendWithBlueMask()](coreimage/cifilter-swift.class/blendwithbluemask().md)
- [blendWithMask()](coreimage/cifilter-swift.class/blendwithmask().md)
- [blendWithRedMask()](coreimage/cifilter-swift.class/blendwithredmask().md)
- [bloom()](coreimage/cifilter-swift.class/bloom().md)
- [cannyEdgeDetector()](coreimage/cifilter-swift.class/cannyedgedetector().md)
- [comicEffect()](coreimage/cifilter-swift.class/comiceffect().md)
- [coreMLModel()](coreimage/cifilter-swift.class/coremlmodel().md)
- [crystallize()](coreimage/cifilter-swift.class/crystallize().md)
- [depthOfField()](coreimage/cifilter-swift.class/depthoffield().md)
- [edges()](coreimage/cifilter-swift.class/edges().md)
- [edgeWork()](coreimage/cifilter-swift.class/edgework().md)
- [gaborGradients()](coreimage/cifilter-swift.class/gaborgradients().md)
- [gloom()](coreimage/cifilter-swift.class/gloom().md)
- [heightFieldFromMask()](coreimage/cifilter-swift.class/heightfieldfrommask().md)
