[core, ios] replace altitude with fov
ported from -js: eb6c6596c6a7a61363d30356674e0002153b1d19 `altitude` was a terribly-named variable that was used to indirectly control the fov. This should eliminate some confusion. `altitude` was equivalent to `cameraToCenterDistance / height`
This commit is contained in:
committed by
John Firebaugh
parent
ebd241363d
commit
38b5cb0c77
@@ -23,8 +23,8 @@ Values makeValues(const style::SymbolPropertyValues& values,
|
||||
extrudeScale.fill(tile.id.pixelsToTileUnits(1, state.getZoom()) * scale);
|
||||
} else {
|
||||
extrudeScale = {{
|
||||
pixelsToGLUnits[0] * scale * state.getAltitude(),
|
||||
pixelsToGLUnits[1] * scale * state.getAltitude()
|
||||
pixelsToGLUnits[0] * scale * state.getCameraToCenterDistance(),
|
||||
pixelsToGLUnits[1] * scale * state.getCameraToCenterDistance()
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ static SymbolSDFProgram::UniformValues makeSDFValues(const style::SymbolProperty
|
||||
const float gammaBase = 0.105 * values.sdfScale / values.paintSize / pixelRatio;
|
||||
const float gammaScale = (values.pitchAlignment == AlignmentType::Map
|
||||
? 1.0 / std::cos(state.getPitch())
|
||||
: 1.0) / state.getAltitude();
|
||||
: 1.0) / state.getCameraToCenterDistance();
|
||||
|
||||
return makeValues<SymbolSDFProgram::UniformValues>(
|
||||
values,
|
||||
|
||||
Reference in New Issue
Block a user