I'm having trouble with rendering multiple textures. Using XNA gamestudio: working with 3D meshes and texturing. Effect.fx HLSL
I do have a map/level that loads from a heightmap. - This works
I have created an effect.fx file that renders the textures. - This works
Multitexturing shader works to a degree where I hardly can alter the function.
So I can fade from different textures if I pass a height value, would have worked fine if the world was meant to be solid/static, but that's not the case here.
I want to hold certain variables to the vertex/faces and alter them in realtime while the vertexshader and the other drawing components renders it correctly as the variables is being altered.
If I wanted to paint a vertex/face red on a Grass-textured plane then this mentioned vertex/face would then be red.
I'm having a hard time finding the problem. Wasn't able to make a 2 dimensional for loop within the Pass technique loop "that just made too much thinking and almost crashed the application"
Have looked trough the source codes for a few example app with no success.
I even bought a book on the subject, but all I've got so far is how to render different textures when the vertex/faces reaches a certain height value on the Y axis.