# ClosestHitOnly

> Unity considers this geometry opaque. This geometry responds to ray intersections as if it does not have an any hit shader.

## Definition

* **Type:** Field
* **Namespace:** [UnityEngine.Rendering](/engine/6000.6/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
ClosestHitOnly = 2
```

### Remarks

It is recommended that apps use this flag liberally, as it can enable important ray-processing optimizations.
