I get “Shader warning in ‘shader’: No subshaders can run on this graphics card”.
Shader "shader"
{
SubShader
{
Pass
{
GLSLPROGRAM
#ifdef VERTEX
// can't get any crappier than 120
#version 120
void main()
{
// I'm a test, so I don't do anything useful or complicated
gl_Position = ftransform();
}
#endif
#ifdef FRAGMENT
#version 120
void main()
{
// Neither do I
gl_FragColor = vec4(1.0,1.0,1.0,1.0);
}
#endif
ENDGLSL
}
}
// Uncommenting this just silences the warning, it still doesn't work
// Fallback Off
}
The real shaders are only going to run on a few workstations with low-end consumer cards that support DX11, ergo GL 4.1.
I understand I am supposed to specify the target hardware. How? I don’t see any “#target _Ridiculous_HardwareName_010” or “#pragma platform(“cheap_crap”)” sort of maintenance hazards in the documentation (or perhaps I missed it, I’m a bit rushed).
Compiling this using the OpenGL API itself produces empty info logs (that is, all went well), and the shaders produce white blobs as expected, so I can’t imagine any reason for them to fail compiling through Unity.
EDIT: I should add that the cards in question are assorted nvidia makes, and hence use their drivers (that is, they support everything from the stone age to whatever the card can run).