This might sound like a weird question, but here's the story:
There is a small but stubborn community which still plays an older 2005-6 game (Age of Empires III + expansions). Some play it on Windows and some others play on OS X (the game was also ported on OS X).
The problem is when the game was launched on OS X, everyone could play on medium and high shaders settings, it seems that the graphics cards were properly recognised at that time. However, once the newer models got Intel graphics chips (Intel HD 4000, Iris, etc) the medium and higher shaders settings stopped working.
The same game now can display medium-high shaders properly on Windows, but fails to do so in OS X on the same machine (using dual boot). So, it's not a hardware problem. The same graphics chip can display high shaders on Windows (in a DirectX environment), but fails to do so in OS X (in an OpenGL environment).
I first thought this is because the company which ported this game (Macsoft) did not adapt the shaders programming for OpenGL, but apparently they did. And since high shaders once worked in OS X, this means their OpenGL adaptation worked right with different hardware. So, it seems this is a problem with how the game makers wrote their configuration files to recognise hardware devices, somehow the newer Intel graphic chips are not recognised as DirectX 8 / 9 Shader model v 2.0 capable, and rendering defaults to basic DirectX 7 capabilities without any shaders.
I did a bit of research in the game files to try to track down which is the file which makes the game recognise graphic chips and I found out it's devices.xml from this folder (I uploaded all the shaders files in a googledrive, in case anyone wants to take a look):
I discovered that the game ignores everything in the devices.xml file and jumps to the last generic device with the lowest shader settings:
<device name="GenericFF">
generic dx7
<low>Generic DX7</low>
</device>
If I replace this device with a Generic DX8 setting, the game starts displaying more shaders but water rendering gets some weird colour ranges from green to purple.
This Generic DX7 profile is also coded in a separate file called Generic DX7.d3dconfig, which you can find in the same /Config/ folder I mentioned before. In this file you can find a bunch of settings such as:
<d3dconfig>
<fixedfunctionverts>true</fixedfunctionverts>
<techniques>
<enable>alpha transparency</enable>
<enable>alphatest</enable>
<enable>alphatest_flatcolor</enable>
<enable>alphatest_blendcolor</enable>
Each of these shader capabilities have their own settings file, for example alphatest (in the /techniques/ folder):
<technique>
<pass>
<texture stage="0">diffuse</texture>
<rs>alphatest</rs>
<tss>default</tss>
</pass>
</technique>
And, of course, finally all these configuration files which are coded in format similar with XML point to shader programming files such as default_shader.psh in the /Render/ps/ folder:
ps.1.1
def c7, 1, 0, 0, 0
tex t0 //base texture
#ifdef ENVMAP
tex t2 //envmap texture
#endif
mul_x2 r0.rgb, t0, v0 // texture * light
+mul r0.a, t0, v0 // texture * light
#ifdef ENVMAP
// reflectivity is a float value in the r component so the dp3 is a
// clunky way to propogate this value into all components before the lerp
dp3 r1, c6, c7
lrp r0, r1, t2, r0
#endif
#ifdef TREE
add r0, r0, c1
#endif
#ifdef TINT
add r0, r0, c0
#endif
The question is: Is it possible to make this old game (which uses older shader programming, that supported up to Shader model 2.0) recognise newer Intel graphics chips, or is this a problem with how the game on OS X was ported for an OpenGL environment?
UPDATE:
There is another folder which seems unused by the game and in which a file with the same name as the one I mentioned above has code such as:
// default_shader.psh
#ifdef TREE
uniform vec4 pc1;
#endif
#ifdef TINT
uniform vec4 pc0;
#endif
uniform sampler2D tx0;
void main()
{
vec4 diffuse = vec4( texture2D(tx0, gl_TexCoord[0].st) ) * gl_Color;
diffuse.xyz *= 2.0;
#ifdef TREE
diffuse += pc1;
#endif
#ifdef TINT
diffuse += pc0;
#endif
gl_FragColor = diffuse;
}
/*
ps.1.1
def c7, 1, 0, 0, 0
tex t0 //base texture
#ifdef ENVMAP
tex t2 //envmap texture
#endif
mul_x2 r0.rgb, t0, v0 // texture * light
+mul r0.a, t0, v0 // texture * light
#ifdef ENVMAP
// reflectivity is a float value in the r component so the dp3 is a
// clunky way to propogate this value into all components before the lerp
dp3 r1, c6, c7
lrp r0, r1, t2, r0
#endif
#ifdef TREE
add r0, r0, c1
#endif
#ifdef TINT
add r0, r0, c0
#endif
*/