Skip to content

Commit

Permalink
Update terrain.cpp: remove temporary code, add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Capital-Asterisk committed Jun 17, 2024
1 parent 41c216f commit 4ef82be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/testapp/sessions/terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,13 @@ Session setup_terrain_subdiv_dist(
vbufPosView[vbufVertex] = posOut + radialDir * heightmap(skPos);
};

if (true || rChGeo.originSkelPos == rTerrainFrame.position)
// TODO: Limit rChGeo.originSkelPos to always be near the surface. There isn't a point in
// translating the mesh when moving away from the terrain.
// Also add a threshold to only translate if the two positions diverge too far. Vary
// the threshold by the maximum present subdivision level, so less translations are
// needed when moving across low-detail terrain.

if (rChGeo.originSkelPos == rTerrainFrame.position)
{
// Copy offsetted positions from the skeleton for newly added shared vertices

Expand Down

0 comments on commit 4ef82be

Please sign in to comment.