texture mask problem

Blitz3D Forums/Blitz3D Beginners Area/texture mask problem

elcoo(Posted 2008) [#1]
Hi,
i've got this code:
Graphics3D 800,600
camera=CreateCamera()
light=CreateLight()
terrain=CreateTerrain(64)
PositionEntity camera,32,30,-30
RotateEntity camera,20,0,0
;Loading the terrain main texture
tex1=LoadTexture("maintex.bmp")
EntityTexture terrain,tex1
;Creating the oval texture
tex2=CreateTexture(512,512)
ScaleTexture tex2,TerrainSize(terrain),TerrainSize(terrain)
TextureBlend tex2,3
EntityTexture terrain,tex2,0,1
Repeat
;Drawing the oval:
SetBuffer TextureBuffer(tex2)
Color 255,0,0
Oval 246,246,20,20
SetBuffer BackBuffer()
RenderWorld()
Flip
Until KeyHit(1)


but I'd like to make this oval black. The problem is, when I use different blendmodes the whole terrain gets black and if I blendmode 3 a black oval is invisible because of the mask. Any ideas?


Matty(Posted 2008) [#2]
Use multiply blending (blend mode 2) with the second texture having a black oval on a white background.


elcoo(Posted 2008) [#3]
THX matty, worked :)