0
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ This type of terrain painting is usually achieved with vertex colours or Splat Maps — are either of those applicable to your case? \$\endgroup\$
    – DMGregory
    Jan 11, 2016 at 15:57

1 Answer 1

-1
\$\begingroup\$

I found that rendering dynamic Entity-textures in XNA such as cubes or "planes" needs alot of HLSL knowledge, how to throw in shaders and more.

I scrapped my XNA project and started with Java OpenGL "LWJGL". ThinMatrix had a good tutorial series with a quick runtrough of the glsl shader system.

with "dynamic" I meant rendering and changing the entity-texture in realtime.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .