• Advertisement
Sign in to follow this  

Having HLSL Compile failure doing cubemaps

This topic is 4522 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 sampler texture 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 says HRESULT: 0x80004005 (2147500037) Name: E_FAIL Description: An undetermined error occurred Severity code: Failed Facility 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

Share this post


Link to post
Share on other sites
Advertisement

This topic is 4522 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement