Good morning, ive just been looking through the Wiki at the section on using a detail texture controlled by RGBA channels within an image. I was wondering whether this could be adapted to instead of controlling one detail texture, to simply tile four textures, one for each channel. So the RGBA image would effectively become an attributes/blend map.
http://www.horde3d.org/wiki/index.php5?title=Shading_Technique_-_Dot_Product_Detail_TexturingSlightly more useful agai would be not to use a combined RGBA image, rather instead split them into individual grey scale textures, so you can stack as many as you wish (and easier to edit and work with) rather than one image and four channels, which is a pain... (later enhancement would be again perhaps to add tile parallax mapping).
Example:Code:
vec4 blendMap1 = texture2D(tex1, texCoords).gray;
vec4 blendTex1 = texture2D(tex2, texCoords * 300.0).rgb;
vec4 blendMap2 = texture2D(tex3, texCoords).gray;
vec4 blendTex2 = texture2D(tex4, texCoords * 300.0).rgb;
vec4 blendMap3 = texture2D(tex5, texCoords).gray;
vec4 blendTex3 = texture2D(tex6, texCoords * 300.0).rgb;
... and so on
I would have ago myself but don't know the first thing about shaders, and coding in general other than copying and pasting.
If it could be done, would be very useful for terrains. Anyone willing todo it?