日別アーカイブ: 2008年8月18日

Direct3D10 GPU だけでジオメトリ計算 (3)

●まとめ

・Animation 無しの場合

 ■ Transform Shader
  + in VertexStream 0 ( _LL_geometry00 ) M3+P
  + in ShaderResourceView ( _LL_geometry00 ) M3+P
  + in ConstantBuffer ( “GRoot” = _LL_rootWorld ) M4
  + out StreamOutput ( _LL_geometryWorld ) M3

・Animation ありの場合

 ■Animation Shader ( Animation Data がある場合のみ )
  + in VertexStream 0 ( _LL_geometry00 ) M3+P
  + in ShaderResourceView ( “GAnimation” = _LL_Anim00 ) M3
  + in ConstantBuffer ( “GTime” )
  + in ConstantBuffer ( “GBind” )
  + out StreamOutput ( _LL_geometryAnimation ) M3+P

 ■Transform Shader
  + in VertexStream 0 ( _LL_geometryAnimation ) M3+P
  + in ShaderResourceView ( _LL_geometryAnimation ) M3+P
  + in ConstantBuffer ( “GRoot” = _LL_rootWorld ) M4
  + out StreamOutput ( _LL_geometryWorld ) M3

 ■Bone Shader ( Bone Matrix を持っている場合のみ)
  + in VertexStream 0 ( _LL_geometry00 ) M3+P // 後半の BoneMatrix のみ
  + in ShaderResourceView ( _LL_geometryWorld ) M3
  + out StreamOutput ( _LL_geometryWorldB ) M3

M3 = Matrix:float4x3
M4 = Matrix:float4x4
P = Index:int4

・描画

 ■Draw IndexedInstanced (single)
  + in VertexStream 0 ( VertexBuffer )
  + in VertexStream 1 ( _LL_geometryWorld )
  + in ConstantBuffer ( “GCamera” )
  + in ConstantBuffer ( “GLight” )

 ■Draw Bone Indexed
  + in VertexStream 0 ( VertexBuffer )
  + in ShaderResourceView ( _LL_geometryWorldB )
  + in ConstantBuffer ( “GCamera” )
  + in ConstantBuffer ( “GLight” )