can the intensity of LIGHTBLEND be changed?

BlitzMax Forums/BlitzMax Programming/can the intensity of LIGHTBLEND be changed?

Grey Alien(Posted 2006) [#1]
well the title says it all. Sometimes light blend can be too bright, yet you need a similar effect. Does anyone know if the params for lightblend can be altered at all so it's not quite so intense?

thanks.


Dreamora(Posted 2006) [#2]
No, it is already the lowest additive blend present.

If you need a lower brightness, the best you could try is alpha blending or use an image that only has colors in the 0 - 128 range which does not overbright that much (I don't think that "bloom" is what you are looking (that would be first shadeblend it over and then lightblend it once again))


fredborg(Posted 2006) [#3]
You can use SetAlpha or SetColor to change the intensity.


sswift(Posted 2006) [#4]
I thought Dreamora knew everyhting. :-)

Grey:
You can do that in my sprite system by setting the sprite color.


Grey Alien(Posted 2006) [#5]
well set alpha means it's generally less transparent which is not quite what I'm looking for although it's in the right direction. So changing the colour to less than 255,255,255 should have a less brightening effect but then what if the particle is shown on a black background, it won't be as bright. There is no way to reduce the amount of actual blend when two particles overlap or particles go over scenery then...


tonyg(Posted 2006) [#6]
You could use the code here with different setcolor and a lightblend command.
Graphics 800,600
image:TImage=LoadImage("max.png")
n:Float=0.4
    SetBlend alphablend

While Not KeyHit(key_escape)
 Cls
    SetAlpha 1.0
 	Setmodnormal()
	SetColor 255,255,255
	DrawImage image , 100 , 100
	SetBlend lightblend
	SetColor 128,128,128
	settowhite()
	SetAlpha n
    DrawImage image,100,100
    n:+0.01
    If n>1.0 n=0.1
 Flip
Wend
Function setmod2x()
		PrimaryDevice.device.SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_MODULATE2X)
End Function
Function setmodnormal()

				PrimaryDevice.device.SetTextureStageState 0,D3DTSS_COLOROP,D3DTOP_MODULATE
				PrimaryDevice.device.SetTextureStageState 0,D3DTSS_ALPHAOP,D3DTOP_MODULATE

End Function 
Function settowhite()
	PrimaryDevice.device.SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_SELECTARG2 );
	PrimaryDevice.device.SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );
End Function


OGL code is in that same thread.


Grey Alien(Posted 2006) [#7]
that's pretty cool, I don't understand it, but it's cool.


ImaginaryHuman(Posted 2006) [#8]
Do a lightblend and a shadeblend together and use the shadeblend with a given level of gray to darken down the lightblend?