Multitexturing

Blitz3D Forums/Blitz3D Programming/Multitexturing

Wayne(Posted 2005) [#1]
Given:
G=Grass
D=Dirt
R=Rock
S=Stone

I created 512x512 texture called tex0.
It's made up of 4 256x256 grass textures.
G G
G G

Also created 512x512 texture called tex1.
it's made up of 4 256x256 textures.

G R
D S

finally, create 512x512 texture called tex2.
it's made up of 4 256x256 textures each being a gradient fill.

GF GF
GF GF


The goal is to blend my two textures together using the gradient fill to provide a seamless transition. A more advanced version would allow a base texture, tiled texture, and the 2nd UV would control the alpha tile to be used.

I can't seem to get the alpha to cause the blend to work very well.

Here is the basic sample code I'm using. All help appreciated.