Shader with 9 Textures

I try to a make shader that deals with 9 different textures (File.texture), but it seems to me, that there is a limitation of the TEXCOORD definition to a maximum of 8 texture-coordinates.

What can I do to use 9 (or more) textures in one shader?

Thanks.

you´re right; there is a (hardware) limitation on the number of texturecoordinates

it might be possible to draw your geometry twice (using different geometry with different texture coordinates each time)

you might be able to calculate one set of coordinates out of the eight others, probably using transformation matrices. (this would make sense from a performance aspect anyway)

you might be able to use color or position channels to store texture coordinate values

what are you up to?

I found a solution for this problem. It seems to me, that this limitation has something to do with the pixelShader Version. I changed the compile-settings to version vs_2_0 and ps_3_ and now it’s possible to use more than eight different textures.

technique test
{
pass P0
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_3_0 PS();
}
}

I try to make a shader that colorizes, blends or multiplies many different textures into a new one, without rendering.

Thanks for help oschatz.

thx,
it is new to me that this really is possible.

I try to make a shader that colorizes, blends or multiplies many different textures into a new one, without rendering.

Have you seen Blend.fx by mtallen ?

Sounds interesting!

hm…

for clarification. all ps_1_X profiles have 4 texture coordinate registers: ps_1_X registers.

ps_2_X profiles have 8: ps_2_X registers

if i understand the info right, the ps_3_0 profile should have 10: ps_3_0 registers

still it is only possible to sample from more than 16 different textures per pixelshader. even in shader model 3.

does this reflect your findings monoflop?