Hi,
I was just wondering, if you don't set states in an effect but do it using your code (statemanager), why would you need a sampler 'struct' then in your FX/ shader file.
For example, I do this now:
sampler2D textureSampler = sampler_state
{
Texture = (DiffuseTex0);
};
// and in the PixelShader
float4 textureColor = tex2D(textureSampler, input.TexCoord);
Is there a way to skip the sampler 'struct' and access the texture directly, something like:
float4 textureColor = tex2D(sampler(DiffuseTex0), input.TexCoord);
// error: (168) X3037: constructors only defined for numeric bases
Any thoughts?