added some shader-side support for rays