   Can ID3DXSprite work with VS or PS ??
  Hi all,I test it ,and found it does not work,Can ID3DXSprite work with Vertex Shader or pixel shader  ??   
  Not that I am aware of, ID3DXSprite is pretty basic. For any kind of serious work, I'd suggest just rolling your own. It's really not that difficult.   ;  I'd second the idea of rolling your own, ID3DXSprite is meant as a helper class to get you up and running quickly, not as an ultimate solution.Having said that, it should be possible if you set the vertex and pixel shader between ID3DXSprite::Begin() and ID3DXSprite::End().   ;Quote:Original post by CodekaNot that I am aware of, ID3DXSprite is pretty basic. For any kind of serious work, I'd suggest just rolling your own. It's really not that difficult.thanks , I will try it later!   ;Quote:Original post by Evil SteveI'd second the idea of rolling your own, ID3DXSprite is meant as a helper class to get you up and running quickly, not as an ultimate solution.Having said that, it should be possible if you set the vertex and pixel shader between ID3DXSprite::Begin() and ID3DXSprite::End().hi Evil, I try it and it still doesn't work,Quote:V( g_pEffect9->SetTexture( "g_MeshTexture", g_pTexture) );V( g_pEffect9->SetTechnique( "RenderScene" ) );g_pSprite9->Begin(D3DXSPRITE_ALPHABLEND) ;// Apply the techniqe contained in the effect V( g_pEffect9->Begin( &cPasses, 0 ) );for( iPass = 0; iPass < cPasses; iPass++ ){V( g_pEffect9->BeginPass( iPass ) );g_pSprite9->Draw(g_pTexture,NULL,NULL,NULL,D3DCOLOR_RGBA(255,255,255,255));// Render the mesh with the applied techniqueV( g_pEffect9->EndPass() );}V( g_pEffect9->End() );g_pSprite9->End();pixel shader:Quote:PS_OUTPUT RenderScenePS( VS_OUTPUT In ) {PS_OUTPUT Output;    Output.RGBColor = 0.0f;    return Output;}I test it in DirectX SDK's sample-SimpleSample, is anything wrong £¿£¿thanks again!;  I'd suggest using PIX to capture a list of calls to the device and find out what's going on. I'm not sure about the effect framework, I suspect it and ID3DXSprite are two high level components that'll be fighting each other to get what they want too much and it'll just turn into a huge mess...   ;Quote:Original post by Evil SteveI'd suggest using PIX to capture a list of calls to the device and find out what's going on. I'm not sure about the effect framework, I suspect it and ID3DXSprite are two high level components that'll be fighting each other to get what they want too much and it'll just turn into a huge mess...Good News, I set the vertex and pixel shader outside the ID3DXSprite::Begin() and ID3DXSprite::End(),then VS & PS works well .when call ID3DXSprite::End(),the D3D call IDirect3DDevice9::DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, 4, 0, 2) inside, so we should call  g_pEffect9->EndPass()  after ID3DXSprite::End().thanks PIX ,thanks Evil Steve!  ps : I am not come from an English-speaking country ,I am sorry, my English not very well  :)Quote:V( g_pEffect9->Begin( &cPasses, 0 ) );for( iPass = 0; iPass < cPasses; iPass++ ){   g_pSprite9->Begin(D3DXSPRITE_DONOTSAVESTATE) ;   V( g_pEffect9->BeginPass( iPass ) );   g_pSprite9->Draw(g_pTexture,NULL,NULL,NULL,D3DCOLOR_RGBA(255,255,255,255));   g_pSprite9->End();   V( g_pEffect9->EndPass() );}V( g_pEffect9->End() );