   Having HLSL Compile failure doing cubemaps
  Folks,  I am trying to use a simple cube map. Nothing fancy and sample it using texCube and passing a sampler and a direction vector as input. I am getting a weird compile error that I can't track down. Here's my HLSL code for samplertexture  g_txCubeMap;samplerCUBE g_samCubeMap = sampler_state{    Texture = <g_txCubeMap>;    MinFilter = Linear;    MagFilter = Linear;    MipFilter = Linear;};  In vertex shader, I do following    for(int i=0; i<nNumLights; i++ ) {temp_color = texCUBE( g_samCubeMap, normalize(g_LightDir));    vTotalLightDiffuse += g_LightDiffuse * max(0,dot(vNormalWorldSpace, g_LightDir)) ;   //vTotalLightDiffuse += g_LightDiffuse * max(0,dot(vNormalWorldSpace, g_LightDir)) ;}    Output.Diffuse = temp_color;    temp_color and Output.Diffuse are both float4. g_LightDir[] is array of float3. when I compile using fxc I don't get any compilation errors, but at runtime I get following error - 0x80004005 which error look-up utility saysHRESULT: 0x80004005 (2147500037)Name: E_FAILDescription: An undetermined error occurredSeverity code: FailedFacility Code: FACILITY_NULL (0)Error Code: 0x4005 (16389) I am at a complete loss...Any help would be appreciated. I can send the whole project if someone has time.Thanks-R
Cross-post.   