Tuesday, 28 May 2013

XNA not recognizing tex3d in shaders?

XNA not recognizing tex3d in shaders?

texture MapTexture;
sampler MapSampler = sampler_state
{
    Texture = <MapTexture>;
    MinFilter = Point; MagFilter = Point; MipFilter = None;
    AddressU = Wrap; AddressV = Wrap; AddressW = Wrap;
};
Then in a function later I've got:
float4 col = tex3d(MapSampler, float3(x,y,z));
And the pixel shader is declared as:
PixelShader = compile ps_3_0 main();
When I try to compile I get an error "error X3004: undeclared identifier 'tex3d'". What's the reason for this?

No comments:

Post a Comment