# Writing a photon shader

**URL:** https://forum.highend3d.com/t/writing-a-photon-shader/46231
**Category:** Maya
**Tags:** mental-ray
**Created:** [January 12, 2005, 7:27pm UTC](https://forum.highend3d.com/t/writing-a-photon-shader/46231 "2005-01-12T19:27:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![odimann](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/o/bbe5ce/32.png) [@odimann](https://forum.highend3d.com/u/odimann)
#### Post date: [January 12, 2005, 7:27pm UTC](https://forum.highend3d.com/t/writing-a-photon-shader/46231/1 "2005-01-12T19:27:03Z")

</div>

hi  
I am writing a special material shader for mental ray and I want to use photonmapping. I found the method "mi\_compute\_irradiance" to gather the photons after shooting. But I need the incoming direction of the photons. In Maya you can see that this direction is stored with every photon, but I did not find any possibility to get it. If anybody can give some help, it would be very nice 🙂
