I am trying to create a texture with all black pixels Alpha. But can't seem to get it to work.
Here is my code.
ts=512
tex55=CreateTexture (ts,ts,15)
SetBuffer TextureBuffer (tex55,0)
For cdy= 0 To ts-1
For cdx= 0 To ts-1
rcg=Rnd(0,100)
If rcg<70 Then rcg=0
rcr=Int(rcg/2)
rcb=Int(rcg/4)
Color rcr,rcg,rcb
Plot cdx,cdy
Next
Next
ClearTextureFilters
TextureFilter "",15
From what I read this should have worked. But the black always comes out black, not transparant.
I added the TextureFilter part after to see if that would help.
But by theory it should have been set by CreateTexture (ts,ts,15).
CreateTexture doesn't seem to work right.
Also tried:
TextureBlend tex55,1
No success.
Here is my code.
ts=512
tex55=CreateTexture (ts,ts,15)
SetBuffer TextureBuffer (tex55,0)
For cdy= 0 To ts-1
For cdx= 0 To ts-1
rcg=Rnd(0,100)
If rcg<70 Then rcg=0
rcr=Int(rcg/2)
rcb=Int(rcg/4)
Color rcr,rcg,rcb
Plot cdx,cdy
Next
Next
ClearTextureFilters
TextureFilter "",15
From what I read this should have worked. But the black always comes out black, not transparant.
I added the TextureFilter part after to see if that would help.
But by theory it should have been set by CreateTexture (ts,ts,15).
CreateTexture doesn't seem to work right.
Also tried:
TextureBlend tex55,1
No success.