2009-07-06 4 views
1

:이 렌더링하려고하면, 난 아무것도 표시되지 않습니다전체 화면 쿼드 그리기? 이 문제는 무엇

pVertexBuffer[0].Position = D3DXVECTOR3(0.0f,0.0f,0.0f); 
pVertexBuffer[0].TexCoord = D3DXVECTOR2(0.0f,0.0f); 

pVertexBuffer[1].Position = D3DXVECTOR3(m_ScreenResolutionX,0.0f,0.0f); 
pVertexBuffer[1].TexCoord = D3DXVECTOR2(1.0f,0.0f); 

pVertexBuffer[2].Position = D3DXVECTOR3(0.0f,m_ScreenResolutionY,0.0f); 
pVertexBuffer[2].TexCoord = D3DXVECTOR2(0.0f,1.0f); 

pVertexBuffer[3].Position = D3DXVECTOR3(0.0f,m_ScreenResolutionY,0.0f); 
pVertexBuffer[3].TexCoord = D3DXVECTOR2(0.0f,1.0f); 

pVertexBuffer[4].Position = D3DXVECTOR3(m_ScreenResolutionX,0.0f,0.0f); 
pVertexBuffer[4].TexCoord = D3DXVECTOR2(1.0f,0.0f); 

pVertexBuffer[5].Position = D3DXVECTOR3(m_ScreenResolutionX,m_ScreenResolutionY,0.0f); 
pVertexBuffer[5].TexCoord = D3DXVECTOR2(1.0f,1.0f); 

. 버텍스 쉐이더에서는이 버텍스 위치를 변환하지 않고 사용합니다.

답변

4

버텍스 쉐이더는 동질적인 화면 공간 좌표에서 정점을 출력합니다. 그들은 일반적으로 화면 해상도 독립적입니다. 즉, 좌표를 (-1, -1,0)에서 (1, 1, 0)까지 출력해야합니다.