With my work on Shadow Mapping for point lights, I just saw that it might be good to be able to write more than just one shader for a material, with one shader being a fallback for every hardware, and others being chosen based on the available extensions. I atm didn't see any si9mple way to do this in Horde3D, if there is one, correct me.
(When thinking about this, I though about the depth cubemaps provided with EXT_gpu_shader4, though they are no good example for this as they also depend on changes on the C++ side of the things, when used, they might make things quite a bit easier though)
I thought about a setup like this in the shader file:
Code:
[...]
<Context id="OVERLAY">
<Variant priority = "0">
<VertexShader>
[...]
</VertexShader>
<FragmentShader>
[...]
</FragmentShader>
</Variant>
<Variant priority = "1" extension="EXT_gpu_shader4">
[...]
</Variant>
</Context>
[...]
This would just execute the variant of the shader with the highest priority which is available with the given extensions.
If this is a bad idea, just say so, but I though this might be handy.