can the intensity of LIGHTBLEND be changed?
BlitzMax Forums/BlitzMax Programming/can the intensity of LIGHTBLEND be changed?
| ||
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. |
| ||
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)) |
| ||
You can use SetAlpha or SetColor to change the intensity. |
| ||
I thought Dreamora knew everyhting. :-) Grey: You can do that in my sprite system by setting the sprite color. |
| ||
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... |
| ||
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. |
| ||
that's pretty cool, I don't understand it, but it's cool. |
| ||
Do a lightblend and a shadeblend together and use the shadeblend with a given level of gray to darken down the lightblend? |