Would of use happen to know how to use shaders? I've been on other forums trying to get help but no one is replying or even bothering. I'm generating a sphere in 3D and want to be able to use a shader to layer 2 textures of it like this.
I already have my sphere in the shape of the object, but I need to know how to use a shader to test for the height of each vertex from the center of the sphere, I'd gather. I'm just getting confused trying to do this - and it's more frustrating when you can't find anything on what I'm trying to do.
Well, have you tried simply passing the center of the sphere into the shader with SetFloatArray and then write in the vertex shader if(/*pythagoras here*/ < water_level) /*tex1*/; else /*tex2*/? This wont give the sharp edges seen in the picture though... The picture looks as if there are two overlapping meshes.
Also, I haven't done anything with hlsl for a long time, so I cold be making no sense...