This should work on all cards.
I'm going to put it in the Render 2 Texture Module.
I'm going to put it in the Render 2 Texture Module.
'If you want more physically correct luminance (the eye is more receptive to some colour 'components than others), the REC709 coefficients (For average PC monitor) are r=0.2125, 'g=0.7154, b=0.0721. Converted To the TEXTUREFACTOR constant (multiply by 255 And convert To Hex) 'it's: 0x0036B612 [since you have to round some of the coefficients, you lose some precision - 'really the r,g,b parts of the constant should add up To 255 so I'd an extra 1 to the blue. ' Source Color Default is the Red Channel. Function SetMono(state:Byte=True,dwFactor:Int = $0036B612,SourceCol:Int=$FF0000) If State SetColor((SourceCol Shr 16) & $FF,(SourceCol Shr 8) & $FF,SourceCol & $FF) PrimaryDevice.device.SetRenderState(D3DRS_TEXTUREFACTOR, dwFactor) PrimaryDevice.device.SetTextureStageState(1, D3DTSS_COLOROP,D3DTOP_DOTPRODUCT3) PrimaryDevice.device.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE) PrimaryDevice.device.SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_TFACTOR) Else PrimaryDevice.device.SetRenderState(D3DRS_TEXTUREFACTOR, $FFFFFFFF ) PrimaryDevice.device.SetTextureStageState(1,D3DTSS_COLOROP,D3DTOP_MODULATE) PrimaryDevice.device.SetTextureStageState(1,D3DTSS_COLORARG1,D3DTA_TEXTURE) PrimaryDevice.device.SetTextureStageState(1,D3DTSS_COLORARG2,D3DTA_DIFFUSE) SetColor 255,255,255 EndIf End Function


