# Problem with iOS example VolumeRender

**URL:** https://discourse.vtk.org/t/problem-with-ios-example-volumerender/1482
**Category:** Development
**Created:** [August 4, 2019, 6:17am UTC](https://discourse.vtk.org/t/problem-with-ios-example-volumerender/1482 "2019-08-04T06:17:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wvalenzuela](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/w/c2a13f/32.png) [@wvalenzuela](https://discourse.vtk.org/u/wvalenzuela)
#### Post date: [August 4, 2019, 6:17am UTC](https://discourse.vtk.org/t/problem-with-ios-example-volumerender/1482/1 "2019-08-04T06:17:47Z")

</div>

Dear All,

I compiled the VTK for iOS 12.4, and all the examples from Example/iOS/ works really well except the VolumeRender.

VTK/Examples/iOS/VolumeRender for iOS on iPhone XR didn’t show nothing only the background.

The first problem that I found was that the vtkVolumeShaderComposer.h from the VTK source code gave me an error, in this line:

float jitterValue = texture2D(in\_noiseSampler, gl\_FragCoord.xy / textureSize(in\_noiseSampler, 0)).x; line because textureSize return ivec2 and the operator “/“ can not divide vec2 with ivec2

I fixed to:

ivec2 t\_size = textureSize(in\_noiseSampler, 0);

if(t\_size.x == 0 || t\_size.y == 0)

{

t\_size = ivec2(1,1);

}

vec2 value = vec2(gl\_FragCoord.x / float(t\_size.x), gl\_FragCoord.y / float(t\_size.y));

float jitterValue = texture2D(in\_noiseSampler, value).x;

Then the example ran without any problem but still the render didn’t show, only the color background.

Also, I enabled the OpenGL ES3, which is needed for this, as mentioned: [https://blog.kitware.com/volume-rendering-on-ios-and-android/](https://blog.kitware.com/volume-rendering-on-ios-and-android/)

Any help on how to make this example works is really welcome.

Best regards,

Waldo

---

<div class="post-metadata">

### Author: ![cocacc](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@cocacc](https://discourse.vtk.org/u/cocacc)
#### Post date: [March 17, 2020, 2:37pm UTC](https://discourse.vtk.org/t/problem-with-ios-example-volumerender/1482/2 "2020-03-17T14:37:37Z")

</div>

I have the same problem as you. Do you solved it?
