mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-14 09:30:50 -05:00
Fix const-correctness in shaders and add texture init data
This commit is contained in:
@@ -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 = {
|
||||
{
|
||||
|
||||
@@ -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 = {
|
||||
{
|
||||
|
||||
@@ -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 = {
|
||||
{
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user