Fix const-correctness in shaders and add texture init data

This commit is contained in:
Emil Axelsson
2016-10-20 09:39:49 +02:00
parent 709dabb4b1
commit b87539f678
6 changed files with 25 additions and 5 deletions

View File

@@ -49,6 +49,11 @@ return {
CameraMinHeight = 300,
InteractionDepthBelowEllipsoid = 0, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,--512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {
{

View File

@@ -34,6 +34,11 @@ return {
CameraMinHeight = 1000,
InteractionDepthBelowEllipsoid = 10000, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {
{

View File

@@ -37,6 +37,11 @@ return {
CameraMinHeight = 300,
InteractionDepthBelowEllipsoid = 0, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {
{

View File

@@ -22,6 +22,11 @@ return {
CameraMinHeight = 300,
InteractionDepthBelowEllipsoid = 5000, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,--512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {

View File

@@ -62,9 +62,9 @@ namespace globebrowsing {
// Commented this for-loop. Not necessary since the keyValuePairs
// are always supposed to be equal. Comparing strings takes time.
//for (size_t i = 0; i < keyValuePairs.size(); i++) {
// equal = equal && (keyValuePairs[i] == other.keyValuePairs[i]);
//}
for (size_t i = 0; i < keyValuePairs.size(); i++) {
equal = equal && (keyValuePairs[i] == other.keyValuePairs[i]);
}
return equal;
}

View File

@@ -72,7 +72,7 @@
#define SHOW_HEIGHT_RESOLUTION #{showHeightResolution}
#define SHOW_HEIGHT_INTENSITIES #{showHeightIntensities}
float performLayerSettings(float currentValue, PerLayerSettings settings) {
float performLayerSettings(float currentValue, const PerLayerSettings settings) {
float newValue = currentValue;
newValue = sign(newValue) * pow(newValue, settings.gamma);
@@ -82,7 +82,7 @@ float performLayerSettings(float currentValue, PerLayerSettings settings) {
return newValue;
}
vec4 performLayerSettings(vec4 currentValue, PerLayerSettings settings) {
vec4 performLayerSettings(vec4 currentValue, const PerLayerSettings settings) {
vec4 newValue = vec4(
performLayerSettings(currentValue.r, settings),
performLayerSettings(currentValue.g, settings),