---
title: "shader(_:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/hovereffectcomponent/hovereffect-swift.struct/shader(_:)"
---

# shader(_:)

Returns a hover effect style that applies hover state data to a custom shader that applies to the entity’s model.

## Declaration

```swift
static func shader(_ inputs: HoverEffectComponent.ShaderHoverEffectInputs) -> HoverEffectComponent.HoverEffect
```

## Parameters

- `inputs`: A doc://com.apple.RealityKit/documentation/RealityKit/HoverEffectComponent/ShaderHoverEffectInputs instance that allows you to customize various aspects of this hover effect.

## Discussion

Discussion The custom shader can be either MaterialX or CustomMaterial. warning: This style doesn’t display anything without an appropriate custom shader.
