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

# glassDistortion()

Distorts an image by applying a glass-like texture.

## Declaration

```swift
class func glassDistortion() -> any CIFilter & CIGlassDistortion
```

## Return Value

Return Value The distorted image.

## Discussion

Discussion This method applies the glass distortion filter to an image. This effect distorts an image by applying a glass texture from the raised portions of the texture map image. The glass distortion filter uses the following properties: The following code creates a filter that results in a glass-like distortion applied to the image: func glassDistortion(inputImage: CIImage, textureImage: CIImage) -> CIImage {     let filter = CIFilter.glassDistortion()     filter.inputImage = inputImage     filter.textureImage = textureImage     filter.center = CGPoint(x: 1791, y: 1344)     filter.scale = 500     return filter.outputImage! }

## See Also

### Filters

- [bumpDistortion()](coreimage/cifilter-swift.class/bumpdistortion().md)
- [bumpDistortionLinear()](coreimage/cifilter-swift.class/bumpdistortionlinear().md)
- [circleSplashDistortion()](coreimage/cifilter-swift.class/circlesplashdistortion().md)
- [circularWrap()](coreimage/cifilter-swift.class/circularwrap().md)
- [displacementDistortion()](coreimage/cifilter-swift.class/displacementdistortion().md)
- [droste()](coreimage/cifilter-swift.class/droste().md)
- [glassLozenge()](coreimage/cifilter-swift.class/glasslozenge().md)
- [holeDistortion()](coreimage/cifilter-swift.class/holedistortion().md)
- [lightTunnel()](coreimage/cifilter-swift.class/lighttunnel().md)
- [ninePartStretched()](coreimage/cifilter-swift.class/ninepartstretched().md)
- [ninePartTiled()](coreimage/cifilter-swift.class/nineparttiled().md)
- [pinchDistortion()](coreimage/cifilter-swift.class/pinchdistortion().md)
- [stretchCrop()](coreimage/cifilter-swift.class/stretchcrop().md)
- [torusLensDistortion()](coreimage/cifilter-swift.class/toruslensdistortion().md)
- [twirlDistortion()](coreimage/cifilter-swift.class/twirldistortion().md)
