# PRISM Rendering Chroma Depth Perception not working

**URL:** <https://discourse.slicer.org/t/prism-rendering-chroma-depth-perception-not-working/23361>\
**Category:** Support\
**Created:** [May 10, 2022, 4:12pm UTC](https://discourse.slicer.org/t/prism-rendering-chroma-depth-perception-not-working/23361 "2022-05-10T16:12:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Connor-Bowley](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/connor-bowley/32/12762_2.png) [@Connor-Bowley](https://discourse.slicer.org/u/Connor-Bowley)\
**Post date:** [May 10, 2022, 4:12pm UTC](https://discourse.slicer.org/t/prism-rendering-chroma-depth-perception-not-working/23361/1 "2022-05-10T16:12:05Z")

</div>

I am currently unable to use the Chroma Depth Perception with the sample data as per the [tutorial](https://githubcomets-vis-interactiveslicerprismrendering.readthedocs.io/en/latest/tutorials.html#chroma-depth-perception). When looking at the error log, it is saying “Shader failed to compile”.

@lassoan You were thinking it is likely an API change in a newer version of VTK? Any idea how to fix this?

Slicer used:  
OS: Windows  
Preview 5.1.0-2022-05-08 r30927 / 1efef1b

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 10, 2022, 11:12pm UTC](https://discourse.slicer.org/t/prism-rendering-chroma-depth-perception-not-working/23361/2 "2022-05-10T23:12:03Z")

</div>

Yes, there was an API change from VTK8 to VTK9 that impacted ChromaDepthShader. You need to replace `computeLighting(c, 0)` by `computeLighting(color, 0, 0.0)` to make it work with VTK9.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [May 11, 2022, 12:11pm UTC](https://discourse.slicer.org/t/prism-rendering-chroma-depth-perception-not-working/23361/3 "2022-05-11T12:11:32Z")

</div>

Would like to add that Prism rendering does not work as expected in 5.1-2022-05-10 in terms of “Plane intersecting”:  
“Initialize Entry” and “Target Entry” add an ROI rather than a fiducial markup and there is no visible scissor effect in the 3D view.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/9/99a121fdef5fdab26f452eff6d012c68111f1caf.jpeg)

Closing Slicer displays:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/a/fa549527b269c97a3d44566a129e339f90b65902.png)

4.11 works well.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 11, 2022, 3:08pm UTC](https://discourse.slicer.org/t/prism-rendering-chroma-depth-perception-not-working/23361/4 "2022-05-11T15:08:18Z")

</div>

@drouin-simon could you have a look at these issues?
