# How to define the channels and data types of vtkTexture

**URL:** <https://discourse.vtk.org/t/how-to-define-the-channels-and-data-types-of-vtktexture/14850>\
**Category:** Development\
**Created:** [November 11, 2024, 10:16am UTC](https://discourse.vtk.org/t/how-to-define-the-channels-and-data-types-of-vtktexture/14850 "2024-11-11T10:16:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lincac](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lincac/32/9404_2.png) [@Lincac](https://discourse.vtk.org/u/Lincac)\
**Post date:** [November 11, 2024, 10:16am UTC](https://discourse.vtk.org/t/how-to-define-the-channels-and-data-types-of-vtktexture/14850/1 "2024-11-11T10:16:35Z")

</div>

The image data I input has already been specified with the data type and number of channels, but when I use vtkActor to input textures, I use RenderDoc to capture them, and I find that the uploaded textures are always parsed as R8G8B8A8 type. why？

```auto
auto imageData = vtkSmartPointer<vtkImageData>::New();
imageData->SetDimensions(size[0], size[1], 1);
imageData->AllocateScalars(VTK_FLOAT, 1);

auto texture= vtkSmartPointer<vtkTexture>::New();
texture->SetInputData(imageData);

bodyActor->GetProperty()->SetTexture("texture", texture);

```

 ![image](https://discourse.vtk.org/uploads/default/original/2X/e/ea7298c1a30dcb6d34ed6a2e2ce9521aeadd20fb.png)

---

<div class="post-metadata">

**Author:** ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)\
**Post date:** [November 19, 2024, 12:10pm UTC](https://discourse.vtk.org/t/how-to-define-the-channels-and-data-types-of-vtktexture/14850/2 "2024-11-19T12:10:37Z")

</div>

Hello,

My two cents: I believe that’s due the way `vtkTexture` was designed: always RGBA, 8 bits per channel, regardless of the image source settings.

best,

PC

---

<div class="post-metadata">

**Author:** ![Lincac](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lincac/32/9404_2.png) [@Lincac](https://discourse.vtk.org/u/Lincac)\
**Post date:** [November 20, 2024, 2:47am UTC](https://discourse.vtk.org/t/how-to-define-the-channels-and-data-types-of-vtktexture/14850/3 "2024-11-20T02:47:41Z")

</div>

I feel the same way, but I found that its internal shadowMap can be set to 24 bits by itself
