mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-16 00:41:18 -06:00
change polarity fl colors and add option (in comments) for white and gray texture
This commit is contained in:
@@ -3,5 +3,5 @@ lower 0.0
|
||||
upper 1.0
|
||||
|
||||
mappingkey 0.0 255 255 50 225
|
||||
mappingkey 0.5 20 50 255 225
|
||||
mappingkey 1.0 255 50 20 225
|
||||
mappingkey 0.5 255 50 20 225
|
||||
mappingkey 1.0 20 50 255 225
|
||||
@@ -2,5 +2,5 @@ width 2.0
|
||||
lower 0.0
|
||||
upper 1.0
|
||||
|
||||
mappingkey 0.0 20 50 255 205
|
||||
mappingkey 1.0 255 50 20 205
|
||||
mappingkey 0.0 255 50 20 225
|
||||
mappingkey 1.0 20 50 255 225
|
||||
|
||||
@@ -280,16 +280,34 @@ void SunTextureManager::processTextureFromName(std::string filename, std::vector
|
||||
{
|
||||
float norm_abs_value = abs(mapvalue)/maxvalue;
|
||||
|
||||
r = 0.0f, g = 0.0f, b = 0.0f;
|
||||
//r = 1.0f, g = 1.0f, b = 1.0f; // white
|
||||
//r = 0.0f, g = 0.0f, b = 0.0f; // black
|
||||
r = 0.5f, g = 0.5f, b = 0.5f; // gray
|
||||
if(mapvalue != 0.0f){
|
||||
float colorIntensity = damper*log(1 + multiplyer*norm_abs_value);
|
||||
if (wsaMapType.compare("agong") == 0 )
|
||||
colorIntensity = norm_abs_value;
|
||||
|
||||
if(mapvalue < 0)
|
||||
r = colorIntensity;
|
||||
else
|
||||
b = colorIntensity;
|
||||
{
|
||||
//r = colorIntensity; //black
|
||||
//g = 1.0 - colorIntensity; // white
|
||||
//b = 1.0 - colorIntensity; // white
|
||||
r = colorIntensity*0.5 + 0.5;
|
||||
g = colorIntensity*0.5 + 0.5;
|
||||
b = colorIntensity*0.5 + 0.5;
|
||||
}
|
||||
|
||||
else{
|
||||
//b = colorIntensity; // black
|
||||
//r = 1.0 - colorIntensity; // white
|
||||
//g = 1.0 - colorIntensity; // white
|
||||
r = 1.0 - (colorIntensity*0.5 + 0.5); // gray
|
||||
g = 1.0 - (colorIntensity*0.5 + 0.5); // gray
|
||||
b = 1.0 - (colorIntensity*0.5 + 0.5); // gray
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
std::vector<float> rgb = {r,g,b};
|
||||
rgbLayers.push_back(rgb);
|
||||
|
||||
Reference in New Issue
Block a user