Skip to content

Instantly share code, notes, and snippets.

@wewindy
Created December 14, 2020 10:17
Show Gist options
  • Save wewindy/c17951c724c0dcb207bb623e8b46eb53 to your computer and use it in GitHub Desktop.
Save wewindy/c17951c724c0dcb207bb623e8b46eb53 to your computer and use it in GitHub Desktop.
czm_computerPosition.glsl from Primitive.js
vec4 czm_computePosition()
{
vec4 p;
if (czm_morphTime == 1.0)
{
p = czm_translateRelativeToEye(position3DHigh, position3DLow);
}
else if (czm_morphTime == 0.0)
{
p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
}
else
{
p = czm_columbusViewMorph(czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy), czm_translateRelativeToEye(position3DHigh, position3DLow), czm_morphTime);
}
return p;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment