At least there's one less bug in the sourcechuck_starchaser wrote:The problem with the shaders was what I suspected.
Let me say first; you were right about those mistakes in default and highend fp's, but fixing those
mistakes didn't make any difference; probably because there aren't more than two lights, and the
mistakes involved lights 2 through 7; -- 0 and 1 don't use attenuation of any kind.
Yep, whenever meshes have a single texture, they use the _simple technique.chuck_starchaser wrote:The problem with rocky planets and oxes was that they only call for one texture; and don't specify
a shader. So the engine code was/is selecting highend_simple.technique; which in turn calls for
fixed8.vp and ambientmapped_simple.fp.
Which reminds me, there's still no auto-default for transparent meshes...
Hm... the low end of shaders may be completely broken, I don't pay that much attention to them. I'll inspect them all right now.chuck_starchaser wrote:What fixed8.vp was doing was computing the reflect vector, and then using a sphermap formula
to pass a final, 2D texture coordinate to the fp. It also passed a computed fetch from the normal
for like ambient light.
That's OK - according to GLSL specs, any number of writes are acceptable, the final state of the register is what matters. You can even read it (though it won't have any meaningful value if it hasn't been assigned, you can't read the current pixel on the framebuffer).chuck_starchaser wrote:There was also repeated assignments
to glFragWhatever, I mean the output, which I don't think is kosher; may be wrong; but I think
the output auto-clamps, so it should be written to once at the end of the computation.