I was hoping I might get a reply from Mark or Simon on this one, but maybe Tom or one of the others who has helped with Blitz3d's development over the years might know this too.
I want to exactly emulate the blending mode that Blitz3D calls Modulate2X. I don't know for sure if Blitz doesn't anything a little differently from the general way of Mod2X, but if it does, I want to do that too, since I would like to be able to use my mightmaps from Gile[s].
Essentially TrueVision3D doesn't natively use this blend mode for meshes ( only landscapes, for splatting, I guess ) and I'm going to see if I can write a simple pixel shader to emulate it. Just a simple shader which emulates a base texture on texture layer 0 with UV set 0 and a modulate2x lightmap on layer 1 with UV set 1.
But there's precious little good information on modulate2x around as far as I can see. I know what it does, but not how it does it, so to speak. I know that anything over 128,128,128 brightens the base texture and anything below darkens the base texture, but I'm not sure exactly what math is going on to achieve this.
So exactly what is Blitz doing here?
I want to exactly emulate the blending mode that Blitz3D calls Modulate2X. I don't know for sure if Blitz doesn't anything a little differently from the general way of Mod2X, but if it does, I want to do that too, since I would like to be able to use my mightmaps from Gile[s].
Essentially TrueVision3D doesn't natively use this blend mode for meshes ( only landscapes, for splatting, I guess ) and I'm going to see if I can write a simple pixel shader to emulate it. Just a simple shader which emulates a base texture on texture layer 0 with UV set 0 and a modulate2x lightmap on layer 1 with UV set 1.
But there's precious little good information on modulate2x around as far as I can see. I know what it does, but not how it does it, so to speak. I know that anything over 128,128,128 brightens the base texture and anything below darkens the base texture, but I'm not sure exactly what math is going on to achieve this.
So exactly what is Blitz doing here?