Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualiedoc

Posted 03 February 2012 - 05:28 AM

I don't know why, but i used that line just like you did, and it compiles perfect for me. here is the effect file i tried it with:

cbuffer cbPerObject
{
	 float4x4 WVP;
};

struct VS_INPUT
{
	 float4 Pos : POSITION;
	 float4 Color : COLOR;
};

struct VS_OUTPUT
{
	 float4 Pos : SV_POSITION;
	 float4 Color : COLOR;
};

VS_OUTPUT VS(VS_INPUT vIn)
{
	 VS_OUTPUT output = (VS_OUTPUT)0;

	 output.Pos = mul(vIn.Pos, WVP);
	 output.Color = vIn.Color;
	 return output;
}

float4 PS(VS_OUTPUT input) : SV_Target
{
	 return input.Color;
}

VertexShader vss = CompileShader( vs_4_0, VS() );
GeometryShader gss= ConstructGSWithSO( vss, "POSITION.xyz; COLOR.xyzw" );
technique10 Tech
{
	pass P0
	{
		  SetVertexShader(vss );
		  SetGeometryShader( gss );
		  SetPixelShader( CompileShader( ps_4_0, PS() ) );
	}
}

I know that's probably not helpful for you. What is the exact error you are getting?

wait, are you saying that if you remove this single line, it works, but if you put it there, it doesn't? does it show you an error for your effect file? or is the error only in the applications code?

#4iedoc

Posted 03 February 2012 - 05:23 AM

I don't know why, but i used that line just like you did, and it compiles perfect for me. here is the effect file i tried it with:

cbuffer cbPerObject
{
	 float4x4 WVP;
};

struct VS_INPUT
{
	 float4 Pos : POSITION;
	 float4 Color : COLOR;
};

struct VS_OUTPUT
{
	 float4 Pos : SV_POSITION;
	 float4 Color : COLOR;
};

VS_OUTPUT VS(VS_INPUT vIn)
{
	 VS_OUTPUT output = (VS_OUTPUT)0;

	 output.Pos = mul(vIn.Pos, WVP);
	 output.Color = vIn.Color;
	 return output;
}

float4 PS(VS_OUTPUT input) : SV_Target
{
	 return input.Color;
}

VertexShader vss = CompileShader( vs_4_0, VS() );
GeometryShader gss= ConstructGSWithSO( vss, "POSITION.xyz; COLOR.xyzw" );
technique10 Tech
{
	pass P0
	{
		  SetVertexShader(vss );
		  SetGeometryShader( gss );
		  SetPixelShader( CompileShader( ps_4_0, PS() ) );
	}
}

I know that's probably not helpful for you. What is the exact error you are getting?

#3iedoc

Posted 03 February 2012 - 05:22 AM

I don't know why, but i used that line just like you did, and it compiles perfect for me. here is the effect file i tried it with:

cbuffer cbPerObject
{
	 float4x4 WVP;
};

struct VS_INPUT
{
	 float4 Pos : POSITION;
	 float4 Color : COLOR;
};

struct VS_OUTPUT
{
	 float4 Pos : SV_POSITION;
	 float4 Color : COLOR;
};

VS_OUTPUT VS(VS_INPUT vIn)
{
	 VS_OUTPUT output = (VS_OUTPUT)0;

	 output.Pos = mul(vIn.Pos, WVP);
	 output.Color = vIn.Color;
	 return output;
}

float4 PS(VS_OUTPUT input) : SV_Target
{
	 return input.Color;
}

VertexShader vss = CompileShader( vs_4_0, VS() );
GeometryShader gss= ConstructGSWithSO( vss, "POSITION.xyz; COLOR.xyzw" );
technique10 Tech
{
	pass P0
	{
		  SetVertexShader(vss );
		  SetGeometryShader( gss );
		  SetPixelShader( CompileShader( ps_4_0, PS() ) );
	}
}

#2iedoc

Posted 03 February 2012 - 05:21 AM

I don't know why, but i used that line just like you did, and it compiles perfect for me. here is the effect file i tried it with:

cbuffer cbPerObject
{
	 float4x4 WVP;
};

struct VS_INPUT
{
	 float4 Pos : POSITION;
	 float4 Color : COLOR;
};

struct VS_OUTPUT
{
     float4 Pos : SV_POSITION;
	 float4 Color : COLOR;
};

VS_OUTPUT VS(VS_INPUT vIn)
{
VS_OUTPUT output = (VS_OUTPUT)0;

	 output.Pos = mul(vIn.Pos, WVP);
	 output.Color = vIn.Color;
     return output;
}

float4 PS(VS_OUTPUT input) : SV_Target
{
	 return input.Color;
}

VertexShader vss = CompileShader( vs_4_0, VS() );
GeometryShader gss= ConstructGSWithSO( vss, "POSITION.xyz; COLOR.xyzw" );
technique10 Tech
{
	pass P0
	{
          SetVertexShader(vss );
		  SetGeometryShader( gss );
          SetPixelShader( CompileShader( ps_4_0, PS() ) );
	}
}

#1iedoc

Posted 03 February 2012 - 05:21 AM

I don't know why, but i used that line just like you did, and it compiles perfect for me. here is the effect file i tried it with:

cbuffer cbPerObject
{
float4x4 WVP;
};

struct VS_INPUT
{
float4 Pos : POSITION;
float4 Color : COLOR;
};

struct VS_OUTPUT
{
    float4 Pos : SV_POSITION;
float4 Color : COLOR;
};

VS_OUTPUT VS(VS_INPUT vIn)
{
VS_OUTPUT output = (VS_OUTPUT)0;

output.Pos = mul(vIn.Pos, WVP);
output.Color = vIn.Color;
    return output;
}

float4 PS(VS_OUTPUT input) : SV_Target
{
return input.Color;
}

VertexShader vss = CompileShader( vs_4_0, VS() );
GeometryShader gss= ConstructGSWithSO( vss, "POSITION.xyz; COLOR.xyzw" );
technique10 Tech
{
    pass P0
    {
        SetVertexShader(vss );
SetGeometryShader( gss );
        SetPixelShader( CompileShader( ps_4_0, PS() ) );
    }
}

PARTNERS