Implement playable Mac client and rendering validation
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <cmath>
|
||||
|
||||
namespace mtgodot {
|
||||
// 40250 MapOutdoor.cpp / AreaTerrain.cpp. Arguments in scaled centimetres.
|
||||
inline float water_depth_alpha(double depth_cm, double height_scale) {
|
||||
if (!std::isfinite(depth_cm) || !std::isfinite(height_scale) ||
|
||||
height_scale <= 0.0 || depth_cm <= 0.0) return 0.0f;
|
||||
double alpha = depth_cm / (400.0 * height_scale);
|
||||
return static_cast<float>(alpha > 0.8 ? 0.8 : alpha);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user