not sure what it does? I guess you're generating a normalmap from the color data?

I think I'm going with a workaround then, making the texture twice as wide (left colormap, right normalmap), applying 'scale_x = 0.5;' and using some little helperfunctions to sample the texture properly.
(actually that's pretty much sivan's soluition :D)

But thank you for your suggestions.

Edit: the function would be something like this:
Code:
const static float num_skins_total = 2.0;
const static float4 border_color = { 0.0, 0.0, 0.0, 0.0 };

float4 tex2D_multitex(sampler2D smp, float2 tex, float skin_num)
{
   // address modes:
   tex %= 1.0; // address wrap
   
   //tex = saturate(tex); // address clamp
   
   //if(saturate(tex.x) != tex.x || saturate(tex.y) != tex.y) // address border
   //   return border_color;
   
   return tex2D(smp, (tex + skin_num) / num_skins_total);
}


Last edited by Kartoffel; 09/02/14 10:15.

POTATO-MAN saves the day! - Random