I remember seeing something in the manual about this. Try searching the manual. In short, it'd go like this within your action:
if (very_good_video_card)
{
my.material = very_good_material; // supporting shaders 3.x and under
}
if (good_video_card)
{
my.material = good_material; // supporting shaders 2.x
}
if (fair_video_card)
{
my.material = fair_material; // only supports shaders 1.x
}
if (weak_video_card)
{
my.material = no_shaders; // have no shaders at all
}
This would be the best way to do it. Add this before any while loops so it gets executed only once. I'm not sure, however, if it can be in a while loop to make it repeat each frame. You could probably use a shaders 3.x on a weak video card if it is only used once and not repeated every frame or frequently, but I cannot say if this is true or not.