---
title: MPSRayIntersector
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsrayintersector
---

# MPSRayIntersector

A kernel that performs intersection tests between rays and geometry.

## Declaration

```swift
class MPSRayIntersector
```

## Topics

### Initializers

- [init(coder:device:)](metalperformanceshaders/mpsrayintersector/init(coder:device:).md)
- [init(device:)](metalperformanceshaders/mpsrayintersector/init(device:).md)

### Instance Properties

- [boundingBoxIntersectionTestType](metalperformanceshaders/mpsrayintersector/boundingboxintersectiontesttype.md)
- [cullMode](metalperformanceshaders/mpsrayintersector/cullmode.md)
- [frontFacingWinding](metalperformanceshaders/mpsrayintersector/frontfacingwinding.md)
- [intersectionDataType](metalperformanceshaders/mpsrayintersector/intersectiondatatype.md)
- [intersectionStride](metalperformanceshaders/mpsrayintersector/intersectionstride.md)
- [rayDataType](metalperformanceshaders/mpsrayintersector/raydatatype.md)
- [rayIndexDataType](metalperformanceshaders/mpsrayintersector/rayindexdatatype.md)
- [rayMask](metalperformanceshaders/mpsrayintersector/raymask.md)
- [rayMaskOperator](metalperformanceshaders/mpsrayintersector/raymaskoperator.md)
- [rayMaskOptions](metalperformanceshaders/mpsrayintersector/raymaskoptions.md)
- [rayStride](metalperformanceshaders/mpsrayintersector/raystride.md)
- [triangleIntersectionTestType](metalperformanceshaders/mpsrayintersector/triangleintersectiontesttype.md)

### Instance Methods

- [copy(with:device:)](metalperformanceshaders/mpsrayintersector/copy(with:device:).md)
- [encode(with:)](metalperformanceshaders/mpsrayintersector/encode(with:).md)
- [encodeIntersection(commandBuffer:intersectionType:rayBuffer:rayBufferOffset:intersectionBuffer:intersectionBufferOffset:rayCount:accelerationStructure:)](metalperformanceshaders/mpsrayintersector/encodeintersection(commandbuffer:intersectiontype:raybuffer:raybufferoffset:intersectionbuffer:intersectionbufferoffset:raycount:accelerationstructure:).md)
- [encodeIntersection(commandBuffer:intersectionType:rayBuffer:rayBufferOffset:intersectionBuffer:intersectionBufferOffset:rayCountBuffer:rayCountBufferOffset:accelerationStructure:)](metalperformanceshaders/mpsrayintersector/encodeintersection(commandbuffer:intersectiontype:raybuffer:raybufferoffset:intersectionbuffer:intersectionbufferoffset:raycountbuffer:raycountbufferoffset:accelerationstructure:).md)
- [encodeIntersection(commandBuffer:intersectionType:rayBuffer:rayBufferOffset:rayIndexBuffer:rayIndexBufferOffset:intersectionBuffer:intersectionBufferOffset:rayIndexCount:accelerationStructure:)](metalperformanceshaders/mpsrayintersector/encodeintersection(commandbuffer:intersectiontype:raybuffer:raybufferoffset:rayindexbuffer:rayindexbufferoffset:intersectionbuffer:intersectionbufferoffset:rayindexcount:accelerationstructure:).md)
- [encodeIntersection(commandBuffer:intersectionType:rayBuffer:rayBufferOffset:rayIndexBuffer:rayIndexBufferOffset:intersectionBuffer:intersectionBufferOffset:rayIndexCountBuffer:rayIndexCountBufferOffset:accelerationStructure:)](metalperformanceshaders/mpsrayintersector/encodeintersection(commandbuffer:intersectiontype:raybuffer:raybufferoffset:rayindexbuffer:rayindexbufferoffset:intersectionbuffer:intersectionbufferoffset:rayindexcountbuffer:rayindexcountbufferoffset:accelerationstructure:).md)
- [encodeIntersection(commandBuffer:intersectionType:rayTexture:intersectionTexture:accelerationStructure:)](metalperformanceshaders/mpsrayintersector/encodeintersection(commandbuffer:intersectiontype:raytexture:intersectiontexture:accelerationstructure:).md)
- [recommendedMinimumRayBatchSize(rayCount:)](metalperformanceshaders/mpsrayintersector/recommendedminimumraybatchsize(raycount:).md)

## Relationships

### Inherits From

- [MPSKernel](metalperformanceshaders/mpskernel.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Ray Tracing

- [Accelerating ray tracing and motion blur using Metal](metal/accelerating-ray-tracing-and-motion-blur-using-metal.md)
- [MPSAccelerationStructureGroup](metalperformanceshaders/mpsaccelerationstructuregroup.md)
- [MPSInstanceAccelerationStructure](metalperformanceshaders/mpsinstanceaccelerationstructure.md)
- [MPSTriangleAccelerationStructure](metalperformanceshaders/mpstriangleaccelerationstructure.md)
- [MPSAccelerationStructure](metalperformanceshaders/mpsaccelerationstructure.md)
