Sign in to follow this  
RealMarkP

[CgFX] DirectX9 Profile not compiling in Shader

Recommended Posts

I have a rather simple shader thats failing to load in my engine. I loaded it up in FX Composer 2.5 and it gave me the following error:
Warning  warning C6504 Unknown profile option '''' ignored Graphics\Shader.cgfx 0

Here is my Shader:
// +----------------------------------+
// |         Declared Globals         |
// +----------------------------------+

// Matrix Globals
float4x4	g_WorldViewProjection : WorldViewProjection;

// Texture Globals
texture		g_UITexture;

// Texture Samplers
sampler2D	g_TexSampler = sampler_state
{
    MinFilter	= Linear;
    MagFilter	= Linear;
    AddressU	= Clamp;
    AddressV	= Clamp;
};

// +----------------------------------+
// |           Vertex Shader          |
// +----------------------------------+

struct VSIn
{
	float4 position : POSITION;
	float2 texCoord : TEXCOORD0;
};

struct VSOut
{
	float4 position : POSITION;
	float2 texCoord : TEXCOORD0;
};

// Vertex Shader
VSOut UIVertexShader(VSIn IN)
{
	VSOut OUT;

	// Move the vertex position based on the projection Matrix
	OUT.position = mul(IN.position, g_WorldViewProjection);
	OUT.texCoord = IN.texCoord;

	return OUT;
}


// +----------------------------------+
// |           Pixel Shader           |
// +----------------------------------+

// Pixel Shader
float4 UIPixelShader(VSOut IN) : COLOR
{
	// Show the texture on the quad at desired coordinates
    float4 fResult = tex2D(g_TexSampler, IN.texCoord);
    
    return float4(fResult.xyz, 1.0f);
}


// +----------------------------------+
// |            Techniques            |
// +----------------------------------+

technique UITechnique
{
	pass p0
	{
		VertexShader = compile vp20 UIVertexShader();
		PixelShader = compile fp20 UIPixelShader();
	}
}

[Edited by - RealMarkP on March 5, 2010 8:24:15 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this