summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-09-17 06:26:18 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-09-17 08:03:26 +0300
commitbe09f1707bf7f53bf6f49d724e7820aea0918e8d (patch)
treea7b6eddf4548cb1dabe5a4760fcf5b0dc08f89de /src
parent3811e05bc543fa21a9d32a518d4a3077c195c648 (diff)
Theme draft 2
Task-number: QTRD-2277 Change-Id: Ide3997c2bc5bbe4844b40e84caf9096a597813de Change-Id: Ide3997c2bc5bbe4844b40e84caf9096a597813de Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/datavisualization/engine/shaders/colorOnY.frag2
-rw-r--r--src/datavisualization/engine/shaders/colorOnY_ES2.frag2
-rw-r--r--src/datavisualization/engine/shaders/shadowNoTexColorOnY.frag2
-rw-r--r--src/datavisualization/engine/theme.cpp16
4 files changed, 11 insertions, 11 deletions
diff --git a/src/datavisualization/engine/shaders/colorOnY.frag b/src/datavisualization/engine/shaders/colorOnY.frag
index 61a210c9..80e54a61 100644
--- a/src/datavisualization/engine/shaders/colorOnY.frag
+++ b/src/datavisualization/engine/shaders/colorOnY.frag
@@ -12,7 +12,7 @@ varying highp vec3 lightDirection_cmr;
varying highp vec2 coords_mdl;
void main() {
- highp float heightMod = coords_mdl.y + (1.0 - ambientStrength);
+ highp float heightMod = (coords_mdl.y * 0.3) + 0.7; // Add 30% black to the bottom
highp vec3 materialDiffuseColor = heightMod * color_mdl;
highp vec3 materialAmbientColor = vec3(ambientStrength, ambientStrength, ambientStrength) * materialDiffuseColor;
highp vec3 materialSpecularColor = vec3(1.0, 1.0, 1.0);
diff --git a/src/datavisualization/engine/shaders/colorOnY_ES2.frag b/src/datavisualization/engine/shaders/colorOnY_ES2.frag
index 78c778d3..aba52cfe 100644
--- a/src/datavisualization/engine/shaders/colorOnY_ES2.frag
+++ b/src/datavisualization/engine/shaders/colorOnY_ES2.frag
@@ -10,7 +10,7 @@ varying highp vec3 lightDirection_cmr;
varying highp vec2 coords_mdl;
void main() {
- highp float heightMod = coords_mdl.y + (1.0 - ambientStrength);
+ highp float heightMod = (coords_mdl.y * 0.3) + 0.7; // Add 30% black to the bottom
highp vec3 materialDiffuseColor = heightMod * color_mdl;
highp vec3 materialAmbientColor = vec3(ambientStrength, ambientStrength, ambientStrength) * materialDiffuseColor;
highp vec3 materialSpecularColor = vec3(1.0, 1.0, 1.0);
diff --git a/src/datavisualization/engine/shaders/shadowNoTexColorOnY.frag b/src/datavisualization/engine/shaders/shadowNoTexColorOnY.frag
index 515bf271..68ba2368 100644
--- a/src/datavisualization/engine/shaders/shadowNoTexColorOnY.frag
+++ b/src/datavisualization/engine/shaders/shadowNoTexColorOnY.frag
@@ -37,7 +37,7 @@ highp vec2 poissonDisk[16] = vec2[16](vec2(-0.94201624, -0.39906216),
}*/
void main() {
- highp float heightMod = coords_mdl.y + (1.0 - ambientStrength);
+ highp float heightMod = (coords_mdl.y * 0.3) + 0.7; // Add 30% black to the bottom
highp vec3 materialDiffuseColor = heightMod * color_mdl;
highp vec3 materialAmbientColor = vec3(ambientStrength, ambientStrength, ambientStrength) * materialDiffuseColor;
highp vec3 materialSpecularColor = vec3(1.0, 1.0, 1.0);
diff --git a/src/datavisualization/engine/theme.cpp b/src/datavisualization/engine/theme.cpp
index 89d6101e..ccdc2401 100644
--- a/src/datavisualization/engine/theme.cpp
+++ b/src/datavisualization/engine/theme.cpp
@@ -302,7 +302,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
case QDataVis::ThemePrimaryColors: {
@@ -320,7 +320,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
case QDataVis::ThemeDigia: {
@@ -338,7 +338,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
case QDataVis::ThemeStoneMoss: {
@@ -356,7 +356,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
case QDataVis::ThemeArmyBlue: {
@@ -374,7 +374,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
case QDataVis::ThemeRetro: {
@@ -392,7 +392,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
case QDataVis::ThemeEbony: {
@@ -410,7 +410,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
case QDataVis::ThemeIsabelle: {
@@ -428,7 +428,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme)
m_lightStrength = 5.0f;
m_ambientStrength = 0.5f;
m_highlightLightStrength = 5.0f;
- m_uniformColor = true;
+ m_uniformColor = false;
break;
}
default: