if i may add a question:
why is the rgb texture going on the mesh so low res. theoretically it could be much higher because the rgb is 1920x1080. my guess it has smth. to do with the DepthRGB correction texture that is lower? is there a way around?
Hi,
are you looking for a mesh generated from depth image and shaded as Phong or Gouraud?
First displace the points of a grid with World(Kinect2) using geometry shader, then you need to apply another geometry shader to generate new normals for the displaced geometry. Finally, send the geometry to your favorite shader.
FaceNormals (DX11.GeomFX) comes from DX11 pack by @vux
There are also two shaders which I wrote - TextureDisplace (DX11.GeomFX) which streams out vertices displaced by values sampled from the world texture and Normals (DX11.Effect) which renders the normals of the vertices.
Another approach is to generate normals from the Z position from the world texture. This allows you to have smoother normals. Correct me if I’m wrong, but geometry shader only allows you to calculate flat normals as it can not access neighboring polygons while pixel shader can access neighboring pixels easily.