problem:stream output from vertex shader(not geometry shader)

Started by
28 comments, last by lomateron 12 years, 2 months ago
damm yes it runs here too when i run it in the advanceParticles sample from the sdk but it doent runs in my proyect, read my reply that is behind this one, i edited it
Advertisement
the error is:CXX0030: Error: expression canot be evaluated
could you post a little of your applications code? like when you compile the shader?
this is where it fails

[indent=1]//////////////////////////////////////////////////*******************effect*************************/////////////////////////////////////////
DWORD dwShaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;
#if defined( DEBUG ) || defined( _DEBUG )
dwShaderFlags |= D3D10_SHADER_DEBUG;
#endif

ID3D10Blob* pErr;

hr = D3DX10CreateEffectFromFile( L"Tutorial01.fx", NULL, NULL, "fx_4_0", dwShaderFlags, 0, g_pd3dDevice, NULL,NULL, &g_pEffect, &pErr, NULL );
if( FAILED( hr ) )
{
if (pErr != NULL)
{
LPCSTR psErr = (LPCSTR)pErr->GetBufferPointer();
pErr->Release ();
}

return hr;

}
ok, this might not be the problem, but i'm just going to ask anyway since i can't see at all what your doing wrong. but did you install a more recent version of directx over an older version of directx?

I'm asking, because a couple months ago or so, i had the second latest version of directx sdk installed. everything worked fine. Then i saw there was a new release of the sdk and installed it "over" the version i had before, so i ended up with two versions. all my projects worked fine, but when i tried to use debug mode for directx 10, it was giving me an error when i used a debug flag. so at first i just stopped using the debug flags for directx 10 projects. last month i decided to reinstal windows, and just got the newest version of the dx sdk, so now i only have the latest version, and everything works normal again. If you have two versions of the sdk installed, try uninstalling both of them, then just reinstall the latest version
yes i had a problem installing the Microsoft DirectX SDK (June 2010) because i intalled the Microsoft DirectX SDK (February 2010) first and then i realiced that there was a new version just after intalling it, but when i tried intalling the newest Microsoft DirectX SDK (June 2010), the intaller said that the intallation failed dont remember why, then i saw the samples all that folders i needed from the Microsoft DirectX SDK (June 2010) where there int hte Microsoft DirectX SDK (June 2010) folder so i didnt bothered to reintalling it because the folders were already there with everything, i dont know were the intaller failed, its all there. But ok i will do it i will try unistalling all that, man but that like 600mb to download, mmm it doent matter
I am stuck, how do you unistall that, theres no directx sdk program in the control panel programs
yeah i know, reinstalling the sdk is a pain because of it's size to download, but i'm sure it's for the better ;) hope it works for ya!
hey i ultimately discorvered that the error is in the .fx file (after long test) but i really really dont see where is it look this is the code pls help me find where is the mistake

matrix World;
matrix View;
matrix Projection;
float Time;
//--------------------------------------------------------------------------------------
struct VS_INPUT
{
float4 Pos : POSITION;
float4 Color : COLOR;
float3 Vel : VEL;
float Ma : MA;
};
struct PS_INPUT
{
float4 Pos : SV_POSITION;
float4 Color : COLOR;
};
PS_INPUT VS( VS_INPUT input )
{
PS_INPUT output = (PS_INPUT)0;
output.Pos = mul( input.Pos, World );
output.Pos = mul( output.Pos, View );
output.Pos = mul( output.Pos, Projection );
output.Color = input.Color;
return output;
}
float4 PS( PS_INPUT input) : SV_Target
{
return input.Color;
}
PS_INPUT VS2( VS_INPUT input )
{
PS_INPUT output = (PS_INPUT)0;
output.Pos = mul( input.Pos, World );
output.Pos = mul( output.Pos, View );
output.Pos = mul( output.Pos, Projection );
output.Color = input.Color;
return output;
}
float4 PS2( PS_INPUT input) : SV_Target
{
return input.Color;
}
technique10 Render
{
pass P0
{
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetGeometryShader( NULL );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}
VertexShader vss = CompileShader( vs_4_0, VS2() );
technique10 Pa
{
pass P0
{
SetVertexShader( vss ) );
SetGeometryShader( NULL );
SetPixelShader( CompileShader( ps_4_0, PS2() ) );
}
}
come on ppl you can find the mistake, i am stuck because of it, grate proyects come after this big rock thats not letting me pass

This topic is closed to new replies.

Advertisement