LibGDX mesh heightmap normals and lights

前端 未结 1 721
南旧
南旧 2021-02-14 18:03

I am trying to get mesh normals and lights working in LibGDX project.

I already have textured mesh generated from heightmap texture pixels.

The problem

1条回答
  •  北恋
    北恋 (楼主)
    2021-02-14 19:07

    Solved the problem by debugging and drawing all normal positions with MeshPartBuilder / GL_LINES.

    I found out that the normals were pointing inside the terrain. Changing normal direction was the solution.

    0 讨论(0)
提交回复
热议问题