This commit is contained in:
Erik Broberg
2016-05-10 15:57:24 -04:00
4 changed files with 5 additions and 4 deletions

View File

@@ -58,7 +58,8 @@ namespace openspace {
, maxSplitDepth(22)
{
auto geometry = std::shared_ptr<BasicGrid>(new BasicGrid(
10,10,
256,
256,
TriangleSoup::Positions::No,
TriangleSoup::TextureCoordinates::Yes,
TriangleSoup::Normals::No));

View File

@@ -205,7 +205,7 @@ int ChunkNode::calculateDesiredLevelAndUpdateIsVisible(
Scalar distance = glm::length(cameraToChunk);
_owner.minDistToCamera = fmin(_owner.minDistToCamera, distance);
Scalar scaleFactor = 50 * minimumGlobeRadius;
Scalar scaleFactor = 10 * minimumGlobeRadius;
Scalar projectedScaleFactor = scaleFactor / distance;
int desiredLevel = floor( log2(projectedScaleFactor) );
return desiredLevel;

View File

@@ -93,7 +93,7 @@ namespace openspace {
heightMapDictionary.getValue("FilePath", path);
std::shared_ptr<TileProvider> heightMapProvider =
std::shared_ptr<TileProvider>(new TileProvider(
path, 5000, 512));
path, 5000, 256));
_tileProviderManager->addHeightMap(name, heightMapProvider);
}

View File

@@ -57,7 +57,7 @@ void main()
vec2 samplePos = heightSamplingScale*in_UV + heightSamplingOffset;
float sampledHeight = texture(textureSamplerHeight, samplePos).r;
pair.position += pair.normal * sampledHeight * 1e1;
pair.position += pair.normal * sampledHeight * pow(2,15);
vec4 position = modelViewProjectionTransform * vec4(pair.position, 1);