If you generate some data with the GPU or CPU, for example with the marching cubes algorithm, you don’t have texturecoordinates to texture the generated mesh. To solve this problem I wrote a 3 way mapping shader, which generates texturecoordinates, binormals and tangents only out of the vertex position and vertex normal. This technique was also presented in Nvidia’s “Cascades Demo Secrets” paper. To test the mapping I applied my parallax occlusion mapping shader.
- EXT_gpu_shader4 – only because of parallax occlusion mapping