Iload two textures, one with ",2" flag for alpha, one left normal (or given ",1" flag.
I apply both textures to a model but they don't blend correctly. If I apply just the alpha (greyscale) image the object's transparency varies accordingly, but when i apply BOTH colour and alpha textures, the colour texture is MULTIPLIED by the alpha and the transparency doesn't change. What am I doing wrong?
I apply both textures to a model but they don't blend correctly. If I apply just the alpha (greyscale) image the object's transparency varies accordingly, but when i apply BOTH colour and alpha textures, the colour texture is MULTIPLIED by the alpha and the transparency doesn't change. What am I doing wrong?
Const SCREENX = 640 Const SCREENY = 480 ; PositionTexture Example ; ----------------------- Graphics3D SCREENX,SCREENY SetBuffer BackBuffer() AmbientLight(255,255,255) ;rectangle=CreateMesh() ;surf=CreateSurface(rectangle) ; ;v0=AddVertex(surf,-1,-1,0) ; bottom corner 1 ;v1=AddVertex(surf,-1,1,0) ; bottom corner 2 ;v2=AddVertex(surf,1,1,0) ; bottom corner 3 ;v3=AddVertex(surf,1,-1,0) ; bottom corner 4 ; ;t0=AddTriangle(surf,v1,v2,v0) ; bottom triangle 1 ;t1=AddTriangle(surf,v0,v2,v3) ; bottom triangle 2 rectangle=LoadMesh("rectangle.3ds") ;cube=testcreatecube() ScaleEntity rectangle,3,1,3 PositionEntity rectangle,0,0,5 RotateEntity rectangle,180,0,0 sphere=CreateSphere(16) ScaleEntity sphere,25,25,25 PositionEntity sphere,0,-26,5 rostrum=CreatePivot() PositionEntity rostrum,0,0,5 camera=CreateCamera(rostrum) PositionEntity camera,0,80,0 CameraZoom camera,2 PointEntity camera,rectangle alpha=LoadTexture( "working/testalpha.png",2 ) colour=LoadTexture( "working/testcolour.png",1 ) EntityTexture rectangle,colour,0,0 EntityTexture rectangle,alpha,0,1 While Not KeyDown( 1 ) ; Position texture RenderWorld Flip Wend End