I have created a mesh (uniform grid with height values)by loading information from a file. Besides height data the file also contains a texture. The texture is easily mapped to the mesh, I also want the functionality to be able to assign a gradient texture. This is also quite straight-forward but uses other texture coordinates.
However, in my interface i would like to have a check box which alternates between the two textures, replacing the other in real time (now it is temporarily solved by reloading the file with "texture=false/true").
The gradient TextureCoordinates (color depends on height) is generated with
mesh.TextureCoordinates.Add(new System.Windows.Point(vec3.Z, vec3.Z));
And the texture TextureCoordinates is generated with
mesh.TextureCoordinates..Add(new System.Windows.Point(vec3.X, vec3.Y));
so the checkbox must also control which texture coordinate system to use.
Is this possible? And if so, how?
Best Regards!