   HLSL no FX
  Hi,I'm coding a project in which i use DX10 (using shader model 4) and i don't use FX.The only sample of doing that in the SDK is quite poor in content.The part i'm missing the most in the documentation is, what is the "connection" between texture/sampler variable in the shader code and the ones i set in the DX API calls.for example - i create a sampler state:m_device->CreateSamplerState(&sampler_desc,&m_pSamplerState);i also create few textures, create shaderResourceViews to them, and set them as active.in the HLSL code i doTexture2D txTexture_1;Texture2D txTexture_2;Texture2D txTexture_3;sampler samp_1;(i wish to use the same sampler for all of them)so should i assume that the order of variable i create in the hlsl matches the array order of the shaderResourceViews i set in the API ?Thanks for your time,Yoel.   
  The Effects system uses the shader reflection API to determine which slot each variable is using.  You can also use reflection or to get around this, you can assign texture and sampler objects to specific register location in the HLSL code which allows you to assume the order from the API side.  The compiler does not guarantee any specific ordering of resources otherwise.Same goes for samplers, or any other slot group.   ;  Thanks!Assigning texture and sampler objects to specific register location in the HLSL code was what i was looking for =)   