Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. D3D11_SO_DECLARATION_ENTRY pDecl[] =
  2. {
  3. // semantic name, semantic index, start component, component count, output slot
  4. { 0, "SV_POSITION", 0, 0, 4, 0 }, // output all components of position
  5. { 0, "VELOCITY", 0, 0, 3, 0 }, // output the first 3 of the normal
  6. { 0, "AGE", 0, 0, 1, 0 }, // output the first 2 texture coordinates
  7. { 0, "TYPE", 0, 0, 1, 0 }
  8. };
  9.  
  10. hr=pD3dDevice->CreateGeometryShaderWithStreamOutput(bob->GetBufferPointer(), bob->GetBufferSize(),pDecl, sizeof(pDecl)/sizeof(D3D11_SO_DECLARATION_ENTRY),NULL,0,0,NULL,&GeometryShader);
  11.  
  12. technique DefaultTechnique
  13. {
  14. pass pass1
  15. {
  16. SetVertexShader(CompileShader(vs_5_0, VSMain()));
  17.  
  18. SetGeometryShader(GSMain1);
  19.  
  20. SetPixelShader(NULL);
  21.  
  22. SetDepthStencilState(DisableDepth,0);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement