using effect shader on RHW vertices

Started by
9 comments, last by Evil Steve 12 years, 2 months ago
its just rendering normal

rhwtriangle.jpg
:)
Advertisement
It's been a long time since I've used FVF codes, but I'm reasonably certain that using D3DFVF_XYZRHW will bypass the vertex shader entirely (D3DFVF_XYZRHW maps to D3DUSAGE_POSITIONT which specifies that vertex processing is skipped). In particular it makes no sense to be applying transforms to your position as the purpose of XYZRHW is to output untransformed vertex positions. So you should switch to D3DFVF_XYZ and seriously consider switching to vertex declarations too (there's a handy D3DXDeclaratorFromFVF which will help in the initial transition).

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

What mhagain said. D3DFMV_XYZRHW means "Here is a vertex is screen space, don't run the vertex shader". And I'd strongly second getting away from FVF codes - Declarations are much easier to map with vertex shaders, and FVF codes don't even exist in DX10+.

This topic is closed to new replies.

Advertisement