You'd have to move to at least 2 passes.
When did I say I wanted to do it in 1 pass? :-) I asked how to render a sprite as a solid color, because I wanted to do it with two passes: 1. Draw sprite normally. 2. Draw sprite with solid color instead of texture.
So ....
What you've described is exactly what I already thought of months ago, and exactly what I don't want to do. I'm trying to find a generalized way to do the second pass WITHOUT making another copy of the image. That wastes video ram and makes yet another image I need to blit to the screen to buffer it before drawing to avoid stuttering, and which I need to create, track, and free.
Lightblend also alphablends at the same time, right?
Actually, you had that step wrong. You don't lightblend, you use SetAlpha and alphablend. If you use lightblend then you can never get the image to match the solid color unless the solid color is white. But if you use alpahblend and change the alpha, then you get the effect of applying a translucent colored sheet over the sprite and a fully opaque one when you push it up all the way, which is exactly the effect I'm looking for.
But not if it requires creating new images to do it. And I know it doesn't. Not in hardware anyway. If it is impossible in BlitzMax, it is only because we don't have the commands to do it.
I was hoping someone who knows more about OpenGL and DirectX would know of a way to set the blend mode from BlitzMax like a custom SetBlend which is more avanced.
One thing to bare in mind is this is not a `brightness` function - it doesn't scale the RGB values by an equal percentage, it's an ADD function that tops out at white - so basically the same as photoshops `lighten` rather than `brightness. But it works and will be the same on DX and GL.
Actually, the effect I'm going for is that of a second layer with a solid color and variable opacity, set to normal blend. Forget what I said aobut brightness, it would have only applied to white anyway.