Terrain in World Studio

Miscellaneous Forums/Content Creation Tools/Terrain in World Studio

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is your blending method based off of vertex alpha or texture splatting or a mask texture (e.g., red channel blends texture0, green channel blends texture1, and so on and so forth). Considering you're using OpenGL, you should have the option to render the terrain sets with a fragment shader for the masking option. In fact, here's a fragment program for that.

!!ARBfp1.0

ATTRIB tc = fragment.texcoord[0];
ATTRIB color = fragment.color;

TEMP l1;
TEMP l2;
TEMP l3;
TEMP l4;
TEMP blend;

TEX blend, fragment.texcoord[1], texture[0], 2D;
TEX l1, tc, texture[1], 2D;
TEX l2, tc, texture[2], 2D;
TEX l3, tc, texture[3], 2D;
TEX l4, tc, texture[4], 2D;

LRP l2, blend.x, l2, l1;
LRP l3, blend.y, l3, l2;
LRP result.color, blend.z, l4, l3;

END;


No guarantee it works as I've just had it in my collection of shaders for ages. I really should test it in RenderMonkey some time.