---
title: "setFragmentVisibleFunctionTable(_:bufferIndex:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrendercommandencoder/setfragmentvisiblefunctiontable(_:bufferindex:)"
---

# setFragmentVisibleFunctionTable(_:bufferIndex:)

Assigns a visible function table to an entry in the fragment shader argument table.

## Declaration

```swift
func setFragmentVisibleFunctionTable(_ functionTable: (any MTLVisibleFunctionTable)?, bufferIndex: Int)
```

## Parameters

- `functionTable`: An doc://com.apple.metal/documentation/Metal/MTLVisibleFunctionTable instance the command assigns to an entry in the fragment shader argument table for visible function tables.
- `bufferIndex`: An integer that represents the entry in the fragment shader argument table for visible function tables that stores a record of functionTable.

## Discussion

Discussion By default, the visible function table at each index is nil.

## See Also

### Assigning visible function tables

- [setFragmentVisibleFunctionTables(_:bufferRange:)](metal/mtlrendercommandencoder/setfragmentvisiblefunctiontables(_:bufferrange:).md)
