Zeal Shaders / Write your shaders just once, they'll work everywhere, regardless of your target being direct3d or opengl: