I think this is a bit of a redundant work. Take a look in the RTShaderSystem. If you'll add a triplanar texture sub-render state that will replace the regular texture sub-render state. The configuration of the rest of the shader (fog, number of lights and a lot more) will be automatically provided through the RTShaderSystem. Check the Basic RTShader demo and the RTShader multiple light demo (I forgot the name of this demo (which is funny since I wrote it)) in the sample browser.I plan to make most of the shaders configurable. Like materialGenerator.setFog(true/false); or materialGenerator.setAmountOfSupportedLights(2); etc.. This is "just" a bit of string concartanation when I'm done with the full blown version of the shader.
I can help you with the code if you can wait till this weekend.