   Textur als Vertexshader Input
  Für mein Uni Projekt muss ich die Vertizes eines Objekts in Form einer Textur in den Vertexshader laden.Die Textur wird mit CreateTexture2D erstellt ( Flag D3D10_BIND_SHADER_RESOURCE gesetzt ). Mit UpdateSubresource wird die Textur im Grafikspeicher mit einer Textur im Arbeitsspeicher mit jedem Frame ausgetauscht. In der Textur stehn in RGBA die Informationen eines Vertex. Der Vertexshader wiederum nimmt diese Textur her und errechnet z.B. die Normale. Nur wie kann ich in HLSL auf eine mit CreateTexture2D erstellte Textur zugreifen ? Die Textur einfach als EffectVariable zu übergeben wäre zu langsam. Auserdem wie kann ich dem Vertexshader erklären er soll diese Textur als Input verwenden, oder muss ich Fake Vertizes erstellen die dann mit den Vertizes aus der Textur erstetzt werden ?Ich arbeite mit DirectX10 und HLSL 4.0.Würde mich über jede Hilfe freuen, bin schon am verzweifeln.   
  That translates roughly as:For my university project I have the vertices of an object in the form of a texture loaded into the vertex shader.The texture is created with set CreateTexture2D (flag D3D10_BIND_SHADER_RESOURCE). With UpdateSubresource the texture will be exchanged in the graphics memory with a texture in memory, with every frame. In the texture RGBA stand in the information of a vertex. The vertex shader takes her turn, this texture and is calculated as the normal. But how can I access in HLSL to CreateTexture2D created with texture? The texture is simply passed as EffectVariable would be too slow. Besides these as I can tell he is the vertex shader to use this texture as input, or must I create fake vertices are then replace with the vertices of the texture?I work with DirectX 10 and HLSL 4.0.Please help, I am desperate already.   ;  Sorry, i totally forgot to write in english. How stupid.Thanks DrYap for the translation.   ;  It's a rough translation, so I'm not sure I understand everything. Let me see if I got it right:You have a 2D texture that's updated every frame using UpdateSubresource. It contains a position, and the vertex shader reads it, and also uses it to calculate a normal.I don't understand what you're asking about the effect variable. Passing a texture as a shader resource is normal.Regarding a vertex buffer, you don't need one. You can use an empty input layout, and calculate the texture position to use from SV_VertexID.   ;  But how can i access the 2D Texture if i bind it to the gpu in HLSL?I know how to access it if i use effectvariables in DX10 and globalvariables in HLSL, but if i bind it to the gpu using CreateTexture2D, how can i use that texture in HLSL.How can i say to DX10 to draw something, without giving Vertizes to the GPU or usign a Vertexbuffer, because the Vertexshader uses SV_VertexID to ennumerate the Vertizes.PS: Sorry forgot to write in english the last sentence.[Edited by - Luchs on September 8, 2009 5:32:44 AM];  I don't understand what problem you're having with the texture. You create it with CreateTexture2D, then create a resource view for it using CreateShaderResourceView, and then you can assign the resource view to the shader using an effect variable's SetResource method, which you said you know how to do.The last part of your post is translated by Google to "Oh yes, and how can I say DX10 it should be "something" with no vertices passed to draw but with just renumber SV_VertexID without touching the vertex buffer?" Just set a NULL input layout, don't set a vertex buffer, and draw normally. In the shader use SV_VertexID as a basis for a calculation to get XY coords from it.   ;  Thanks for the answer.Is their also a way to disable the vertexbuffer for a short time. I mean i still need the vertexbuffer for drawing other objects. And whats with the Indexbuffer, can i leave it active, but then how can i make triangles of Vertizes that i don't know before i use the Vertexshader or should i use the Geometry Shader ?   ;  I think it's safe to leave the vertex buffer you have. By setting the layout to NULL it won't be accessed. You should be able to use an index buffer just fine. The vertex number in the index buffer will appear as your SV_VertexID.   