by Knightmare » Mon Feb 27, 2012 1:10 am
If you intend to modify the engine (hardware accelerated) but not the map tools, you can do vertex lighting. This still requires subdivision of water faces to have enough vertices for it to look right. Quake2Max did this first I believe, and KMQuake2 has improved on it. There will be differences between GLQuake and Quake2, but the overall approach should be the same.
First, trace downward on map load for each water/warp surface vertex, and get a lightpoint value. You can poke around 1 unit in each direction to get a better sample (keep the brightest value) to avoid dark vertices from sampling in corners. Then store that lightpoint value for each vertex sample (requires adding a light value to the vertex struct). Finally, render with that light value for the vertex color instead of the identity (1,1,1).
Also, using vertex arrays and batching water surfaces with the same texture can greatly speed things up in maps with lots of water/warp faces visible at once (such as areas with a large or many func_waters in Quake2).