Another idea. What if this could be done using the recently added mixin feature? Then you could use a shading language directly rather than trying to convert D code to a shading language. I've never used mixins, so I can't even think of how the syntax would look. Is this a practical idea? -Craig