PDA

View Full Version : Persistent data in the vertex shader (DX10)


Hawkwind
02-12-2008, 07:53 AM
I am currently trying to get into DX10 and was wondering if it is possible to
have data in the vertex shader (probably temporrary registers) which persists
between vertices.
I want to have a series of compressed vertices and decompress them on the
vertex shader. I need to maintain information from one vertex to the next
to achieve this - I would use a line primitive and an index 0,1,2,3,... to
cause each vertex to be processed sequentially through the shader and
streamed out to memory. The stream would then be used as the 'real'
vertex buffer and binned afterwards.
Thats the idea anyway...

Reedbeta
02-12-2008, 08:28 AM
No, the vertex shader processes each vertex completely independently of the others, so this is not possible with vertex shaders. You might be able to do what you want with DX10 geometry shaders, but I don't know enough about how those work to tell you more.

Hawkwind
02-12-2008, 09:57 AM
Thanks, I suspected that this might be the case but DX10 is totally new game to me so I'll probably look at the geometry shader when I get time.