It doesn't. What blending mode is being used, engine-side, that's forcing it to a threshold value (i.e., anything below 0.5 == 0, above == 1.0)?!!ARBfp1.0
# S3O model rendering without shadows
#OPTION ARB_fog_linear;
TEMP temp,reflect,texColor,extraColor,specular;
TEMP tempColor,shadeColor;
#get unit texture
TEX texColor, fragment.texcoord[1], texture[0], 2D;
TEX extraColor, fragment.texcoord[1], texture[1], 2D;
#normalize surface normal
DP3 temp.x, fragment.texcoord[2], fragment.texcoord[2];
RSQ temp.x, temp.x;
MUL temp, fragment.texcoord[2], temp.x;
#calc reflection dir
DP3 reflect.x, temp, fragment.texcoord[3];
MUL reflect.x, reflect.x,{-2};
MAD reflect, temp, reflect.x, fragment.texcoord[3];
#get specular highlight and remove if in shadow
TEX specular, reflect, texture[4], CUBE;
MUL specular, specular, {4,4,4,1};
MUL specular, specular, extraColor.y;
TEX reflect, reflect, texture[3], CUBE;
LRP shadeColor, extraColor.y, reflect, fragment.color;
#LRP texColor, texColor.w, extraColor.w, texColor;
ADD shadeColor, shadeColor, extraColor.x;
MAD result.color, texColor, shadeColor, specular;
MUL result.color.w, extraColor.w, fragment.color.w;
END
I assume that this is because the resulting value's supposed to be used when rendering the shadowmap, which needs to be 1-bit?
So... is this going to get fixed, ever? Or should we assume that nobody can fix it to work like it used to, and we should write a custom shadowmap implementation in GLSL at some point?
What's the problem? Does anybody know? This used to work. The fragment programs haven't changed, and are still reporting clear pixels back when the fragment program terminates. So, what got broken, and why is it so terrifying to fix it?
While I'm thinking about the shadowmap stuff...
If map damage is disabled, then it should be possible to quit including the terrain mesh in the shadowmap generation step.
Then... voila, much cheaper shadows. Project them onto the terrain mesh and let mappers bake shadowmaps and lightmaps.
Then lighting is entirely irrelevant to maps... and we can quit lighting the terrain entirely and just render the fragments + Unit shadowmap, which would save a lot of CPU / GPU.
I know map damage is considered a "major feature" of the engine, but in truth it's been mainly turned off in most games, including BA, with only a few exceptions for giant nukes et al.
I see no reason why it cannot be supported as a legacy feature, but it's a performance dead-end.
Everywhere we turn, map damage gets in the way. Pathfinder? Gets borked by map damage- I repeated my old experiments with NanoBlobs again, and it still screws up pathfinder performance, royally.
LOS? Same. Can't assume that terrain's where it was, have to fetch it every time... slow.
Raw rendering of the terrain mesh? Oops, there again- we're lighting all of those triangles, and since we don't have dynamic suns... the only reason is... yup... map damage.
Gotta light those fragments, because otherwise the lighting might not match the mesh. Hey, guess what? If the triangles were fullbright other than Unit casting shadow volume shadows on it... it'd look the same, but it would render massively faster!
Can we please move beyond this issue, and get the featureset I'm requesting here?
This is a major hurdle in terms of performance that's really obnoxious. It's really crummy that we all have to eat the massive performance headaches for a feature that most of us aren't even using any more, and I don't use at all.