Original Post
I started now with basic D3D10 HLSL and effect file programming. What I did: I wrote a VS that creates the vertices of a rectangle by using the vertexid and two global variables (topleft and bottomright points). This works pretty well. So, all vertices get calculated every frame by VS and not by CPU! (GS shouldn't perform well, buffers get allocated with the right size but not initialised) My problem: I can set function parameters... an yes I can set the parameters in the technique10/pass section where the function gets called/set. But setting the parameters does only allow me to set values instead of setting another variable or so. My question: What I want is to use a !NON GLOBAL! variable (constant would be possible) for only one function or pass or technique or whatever as long as it is not global and can be set outside the effect file. What else options do I have? I mean, setting it in the vertex data seems bad. Is it really that limited (new to shader programming) Thx, Vertex [Edited by - Vertex333 on October 16, 2008 8:12:47 AM]