How can I tell my shader which texture stage to use for a certain texture sampler?
Let's say I have 'dirt.png' as texture stage 0 set in my app (
dbTextureObject( id, stage, image ) ),
and 'normal.png' ( a normal map ) as stage 1.
This is the part of my shader that loads the textures:
texture ModelTexture < string ResourceName = ""; >;
sampler2D textureSampler = sampler_state {
Texture = (ModelTexture);
MagFilter = Linear;
MinFilter = Linear;
AddressU = Clamp;
AddressV = Clamp;
};
texture NormalMap < string ResourceName = ""; >;
sampler2D bumpSampler = sampler_state {
Texture = (NormalMap);
MinFilter = Linear;
MagFilter = Linear;
AddressU = Wrap;
AddressV = Wrap;
};
Is there some kind of semantic to reference to a certain texture stage, or how is this done?
EDIT: Right now, the shader uses the second texture ( the normal map in stage 1 )
for both the diffuse-texture
and as normal map!
They say it's better to burn out, than it is to fade away...