---
title: "makeIntersectionFunction(descriptor:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtllibrary/makeintersectionfunction(descriptor:)"
---

# makeIntersectionFunction(descriptor:)

Synchronously creates an object representing a ray-tracing intersection function, using the specified descriptor.

## Declaration

```swift
func makeIntersectionFunction(descriptor: MTLIntersectionFunctionDescriptor) throws -> any MTLFunction
```

## See Also

### Creating intersection function instances

- [makeIntersectionFunction(descriptor:completionHandler:)](metal/mtllibrary/makeintersectionfunction(descriptor:completionhandler:).md)
