Jump to content
  • Advertisement
Sign in to follow this  
RealMarkP

[CgFX] DirectX9 Profile not compiling in Shader

This topic is 3211 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

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!