This is the file i i’m following
float4x4 ProjectionMatrix;
float4x4 WorldMatrix;
float2 Viewport;
sampler Texture;
struct VertexShaderInput
{
float4 Position : POSITION0;
float2 TexUV : TexCoord0;
float4 Hue : COLOR0;
};
struct VertexShaderOutput
{
float4 Position : POSITION0;
float2 TexUV : TexCoord0;
float4 Hue : COLOR0;
float2 Depth : TexCoord1;
};
VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
{
VertexShaderOutput output;
output.Position = mul(mul(input.Position, WorldMatrix), ProjectionMatrix);
// Half pixel offset for correct texel centering.
output.Position.x -= 0.5 / Viewport.x;
output.Position.y += 0.5 / Viewport.y;
output.Depth = float2((output.Position.z / output.Position.w), 0);
if (output.Depth.x < .5)
output.Position.z *= .9;
output.TexUV = input.TexUV;
output.Hue = input.Hue;
return output;
}
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
{
float4 color = input.Hue;
color.rgb *= color.a;
return color;
}
technique Technique1
{
pass Pass0
{
VertexShader = compile vs_2_0 VertexShaderFunction();
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
This is my shader, but i’ve a problem even if i change
pass P0 { VertexShader = compile vs_1_1 VertexShaderFunction(); PixelShader = compile ps_1_1 PixelShaderFunction(); }
with ps_3_0 and vs_3_0 and so on it can’t compile. I tried to compile it with 2MGFX but the result file is even worse.
What should i do? I tried to look for in internet but i didn’t find anything about
i tried to use all the kind of ps but it doens’t change anything ( like Validation of my "How to compile custom effect" ). Any help? Thx!