Thanks to you I got the tessellation working, and for now It's working great, but!
I'm having a small problem with textures, as the title suggests. What I do is that I send a simple variable to the shader, called uv_scale (float), which represents the, well, the uv scale. (texture_coordinate * factor). But, when I use this factor, the texture itself is ONLY visible when close up, and if I take the camera far enough away, it dissapears!
output.Diffuse = float4(saturate(t_map.Sample(ss, input.texcoord*uv_scale).rgb*10.0f), 1.0f); // I time by 10 so that the texture appears brighter, for now...
But without (just removing the *uv_scale), the texture appears all over the mesh, could it be the sampler state?
D3D11_SAMPLER_DESC sd; sd.Filter = D3D11_FILTER_ANISOTROPIC; sd.MaxAnisotropy = 2; sd.AddressU = D3D11_TEXTURE_ADDRESS_WRAP; sd.AddressV = D3D11_TEXTURE_ADDRESS_WRAP; sd.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; sd.BorderColor = 0.0f; sd.BorderColor = 0.0f; sd.BorderColor = 0.0f; sd.BorderColor = 0.0f; sd.MinLOD = 0.0f; sd.MaxLOD = FLT_MAX; sd.MipLODBias = 0.0f;
Now I put the title "tessellation", because in fact I tesselate the sphere, and the actual tesselation works, but just not the texture sampling (well it's not good enough)...
Calculation of texCoords (Domain Shader, I believe this is good enough, but i'm not sure)
uvwCoord.x * patch.texcoord + uvwCoord.y * patch.texcoord + uvwCoord.z * patch.texcoord;
Thanks as usual!
Edited by Migi0027, 27 August 2013 - 02:44 PM.