Multitexturing?

BlitzMax Forums/MiniB3D Module/Multitexturing?

BLaBZ(Posted 2012) [#1]
I'm having trouble multitexturing.

I want to Alphablend or Mask blend 1 texture on top of the other

This code works in Blitz3D but not miniB3d

; Load textures
tex0=LoadTexture( "red.jpg" )
tex1=LoadTexture( "b3texture.png",4 )

; Texture cube with textures
EntityTexture cube,tex0,0,0
EntityTexture cube,tex1,0,1


Any suggestions?

Thanks!

Last edited 2012


AdamRedwoods(Posted 2012) [#2]
I've always mentioned that I thought that was a bug in miniB3D, but who knows. The way to fix it is to fix the source to use DECAL in opengl.

http://www.blitzmax.com/Community/posts.php?topic=95342

specifically:
http://blitzbasic.com/Community/posts.php?topic=94623#1086225

Last edited 2012


BLaBZ(Posted 2012) [#3]
Awesome thanks a lot Adam!


Krischan(Posted 2012) [#4]
Or you could try to use a Brush with the Paintsurface Command. I think I've got this problem too and solved it this way.


BLaBZ(Posted 2012) [#5]
I've never used PaintSurface before? How would you go about this?


Krischan(Posted 2012) [#6]
A simple Example for MiniB3D:



Creates a mesh with a surface, creates a green brush, applies a loaded texture to the first surface layer and paints this brush to the surface of the mesh. This already existed in Blitz3D.

Last edited 2012


BLaBZ(Posted 2012) [#7]
This is great but now I'm losing my vertex shading :/

I'm guessing its one or the other


Krischan(Posted 2012) [#8]
Did you apply UpdateNormals after that?