hello all.
i have two planes in my game engine, both of which i have textured with a forest scene. i want to lay one over the other and make the front one semi-transparent so it gives a kind of depth-effect.
i have two images - one is the normal forest scene and the other is black and white mask version with the white area being the part of the forest that i want to display. ive checked that the black area is 0,0,0 too.
right. heres my code:
; load texture for main picture...
Global treetex = LoadTexture("winter.jpg",1)
; load mask texture, with ",4" for a mask
Global othertex = LoadTexture("winter1.jpg",4)
Global brush = CreateBrush()
; lay the normal texture on layer 0 of the brush...
BrushTexture brush,treetex,0,0
; then the mask on layer 1...
BrushTexture brush,othertex,0,1
{several hundred lines later...}
PaintEntity wall1,brush
PaintEntity wall2,brush
EntityAlpha wall2,0.6
; set the front wall to semi transparent.
when i run this i can still see the black of the mask. what am i doing wrong????
cheers
neil
i have two planes in my game engine, both of which i have textured with a forest scene. i want to lay one over the other and make the front one semi-transparent so it gives a kind of depth-effect.
i have two images - one is the normal forest scene and the other is black and white mask version with the white area being the part of the forest that i want to display. ive checked that the black area is 0,0,0 too.
right. heres my code:
; load texture for main picture...
Global treetex = LoadTexture("winter.jpg",1)
; load mask texture, with ",4" for a mask
Global othertex = LoadTexture("winter1.jpg",4)
Global brush = CreateBrush()
; lay the normal texture on layer 0 of the brush...
BrushTexture brush,treetex,0,0
; then the mask on layer 1...
BrushTexture brush,othertex,0,1
{several hundred lines later...}
PaintEntity wall1,brush
PaintEntity wall2,brush
EntityAlpha wall2,0.6
; set the front wall to semi transparent.
when i run this i can still see the black of the mask. what am i doing wrong????
cheers
neil