0
votes

I'm trying to define a simple SamplerState in an HLSL file to use for textures. When compiling the shader, I get an error:

error X3004: undeclared identifier 'Filter'

Source:

// part of render.hlsl
SamplerState linear_sample=
{
    Filter=MIN_MAG_MIP_LINEAR;
    AddressU = Wrap;
    AddressV = Wrap;
};

Compilation:

hr=D3DX10CreateEffectFromFile("render.hlsl",NULL,NULL,"fx_4_0",D3D10_SHADER_ENABLE_STRICTNESS | D3D10_SHADER_DEBUG,0,dx_device,NULL,NULL,&dx_effect,&dx_err,NULL);'

I've checked on MSDN, and nothing appears to be wrong with my HLSL file. Am I compiling incorrectly?

1

1 Answers

7
votes

Remove the = sign after linear_sample.