hi, I try to compile my fxaa shader but I get this output from the pipeline tool:
FXAA.fx(100,2): error X4532: texlod not supported on this target
#if SM4
#define PS_PROFILE ps_4_0_level_9_1
#define VS_PROFILE vs_4_0
#define COLOR_OUTPUT SV_Target0
#define POSITION_INPUT SV_Position
#define DEFINE_2D_TEXTURE(tex) Texture2D tex##Texture; \
SamplerState tex##Sampler { AddressU = Wrap; AddressV = Wrap; }
#define DEFINE_2D_TEXTURE_RG(tex, regIndex) Texture2D tex##Texture : register(PS_PROFILE,t##regIndex); \
SamplerState tex##Sampler : register(PS_PROFILE,s##regIndex)
#define SAMPLE_TEXTURE_2D(tex, coord) tex##Texture.Sample(tex##Sampler, coord)
#elif SM3
#define PS_PROFILE ps_3_0
#define VS_PROFILE vs_3_0
#define COLOR_OUTPUT COLOR0
#define POSITION_INPUT POSITION
#define DEFINE_2D_TEXTURE(tex) Texture2D tex##Texture; \
sampler tex##Sampler = sampler_state { Texture = ; }
#define DEFINE_2D_TEXTURE_RG(tex, regIndex) sampler tex##Sampler : register(PS_PROFILE,s##regIndex)
#define SAMPLE_TEXTURE_2D(tex, coord) tex2D(tex##Sampler, coord)
#else
#define PS_PROFILE ps_2_0
#define VS_PROFILE ps_2_0
#define COLOR_OUTPUT COLOR0
#define POSITION_INPUT POSITION
#define DEFINE_2D_TEXTURE(tex) Texture2D tex##Texture; \
sampler tex##Sampler = sampler_state { Texture = ; }
#define DEFINE_2D_TEXTURE_RG(tex, regIndex) sampler tex##Sampler : register(PS_PROFILE,s##regIndex)
#define SAMPLE_TEXTURE_2D(tex, coord) tex2D(tex##Sampler, coord)
#endif
#ifdef XBOX
#define FXAA_360 1
#else
#define FXAA_PC 1
#endif
#define FXAA_QUALITY__PRESET 23
#define FXAA_GREEN_AS_LUMA 1
#define FXAA_HLSL_4 1
#include "Fxaa3_11.fxh"
float4x4 World;
float4x4 View;
float4x4 Projection;
Texture2D TheTexture : register(t0);
SamplerState TheSampler : register(s0);
float4 VertexShaderFunction( float4 Position : POSITION0, float4 _Color : COLOR0, float2 _TexCoord : TEXCOORD0) : SV_Position0
{
float4 output;
float4 worldPosition = mul(Position, World);
float4 viewPosition = mul(worldPosition, View);
output = mul(viewPosition, Projection);
return output;
}
float2 InverseViewportSize;
float4 ConsoleSharpness;
float4 ConsoleOpt1;
float4 ConsoleOpt2;
float SubPixelAliasingRemoval;
float EdgeThreshold;
float EdgeThresholdMin;
float ConsoleEdgeSharpness;
float ConsoleEdgeThreshold;
float ConsoleEdgeThresholdMin;
// Must keep this as constant register instead of an immediate
float4 Console360ConstDir = float4(1.0, -1.0, 0.25, -0.25);
float4 PixelShaderFunction_FXAA(float4 _Position : POSITION_INPUT, float4 _Color : COLOR0, float2 _TexCoord : TEXCOORD0 ) : COLOR_OUTPUT
{
#ifdef SM4
FxaaTex theSample = {TheSampler, TheTexture};
#else
float4 theSample = tex2D(TheSampler, _TexCoord);
#endif
return FxaaPixelShader(
_TexCoord,
float4(0,0,0,0), // Not used in PC or Xbox 360
theSample,
theSample,
theSample,
InverseViewportSize, // FXAA Quality only
ConsoleSharpness,
ConsoleOpt1,
ConsoleOpt2,
SubPixelAliasingRemoval,
EdgeThreshold,
EdgeThresholdMin,
ConsoleEdgeSharpness,
ConsoleEdgeThreshold,
ConsoleEdgeThresholdMin,
Console360ConstDir
);
}
float4 PixelShaderFunction_Standard(float4 _Position : POSITION_INPUT, float4 _Color : COLOR0, float2 _TexCoord : TEXCOORD0) : COLOR_OUTPUT
{
#ifdef SM4
return TheTexture.SampleLevel( TheSampler, _TexCoord, 0);
#else
return tex2D(TheSampler, _TexCoord);
#endif
}
technique Standard
{
pass Pass1
{
VertexShader = compile VS_PROFILE VertexShaderFunction();
PixelShader = compile PS_PROFILE PixelShaderFunction_Standard();
}
}
technique FXAA
{
pass Pass1
{
VertexShader = compile VS_PROFILE VertexShaderFunction();
PixelShader = compile PS_PROFILE PixelShaderFunction_FXAA();
}
}
please need help