# access all three scalar data arrays in the shader?

**URL:** https://discourse.vtk.org/t/access-all-three-scalar-data-arrays-in-the-shader/15596
**Category:** Development
**Created:** [May 9, 2025, 10:20am UTC](https://discourse.vtk.org/t/access-all-three-scalar-data-arrays-in-the-shader/15596 "2025-05-09T10:20:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![llibetter](https://discourse.vtk.org/user_avatar/discourse.vtk.org/llibetter/32/9364_2.png) [@llibetter](https://discourse.vtk.org/u/llibetter)
#### Post date: [May 9, 2025, 10:20am UTC](https://discourse.vtk.org/t/access-all-three-scalar-data-arrays-in-the-shader/15596/1 "2025-05-09T10:20:44Z")

</div>

I have three scalar data arrays attached to the CellData of a vtkPolyData. Can I access all three scalar data arrays simultaneously in the shader?

---

<div class="post-metadata">

### Author: ![llibetter](https://discourse.vtk.org/user_avatar/discourse.vtk.org/llibetter/32/9364_2.png) [@llibetter](https://discourse.vtk.org/u/llibetter)
#### Post date: [May 9, 2025, 10:26am UTC](https://discourse.vtk.org/t/access-all-three-scalar-data-arrays-in-the-shader/15596/2 "2025-05-09T10:26:49Z")

</div>

Or can I combine multiple scalars into a single one? Is there a limit to the number of Components with SetNumberOfComponents()?
