aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-18 15:57:25 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-18 15:57:25 +0200
commit2f2b7915eade91fe20af7c9e5e8921c35342a672 (patch)
tree1720ca05e0ce97cee3a614bb0a13fe93ccb30a2c /src
parentc1cfcb15774b05285acc91be928b90105f71632b (diff)
downloadminetest-2f2b7915eade91fe20af7c9e5e8921c35342a672.tar.gz
minetest-2f2b7915eade91fe20af7c9e5e8921c35342a672.tar.bz2
minetest-2f2b7915eade91fe20af7c9e5e8921c35342a672.zip
Fix and tune stars
Diffstat (limited to 'src')
-rw-r--r--src/sky.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sky.cpp b/src/sky.cpp
index ba9b17493..3477f0180 100644
--- a/src/sky.cpp
+++ b/src/sky.cpp
@@ -272,7 +272,8 @@ void Sky::render()
(0.285 - fabs(wicked_time_of_day < 0.5 ?
wicked_time_of_day : (1.0 - wicked_time_of_day))) * 10));
float f = starbrightness;
- video::SColor starcolor(255, f*120,f*120,f*120);
+ float d = 0.007;
+ video::SColor starcolor(255, f*90,f*90,f*90);
if(starcolor.getBlue() < m_skycolor.getBlue())
break;
u16 indices[SKY_STAR_COUNT*4];
@@ -284,14 +285,13 @@ void Sky::render()
indices[i*4+3] = i*4+3;
v3f p = m_stars[i];
core::CMatrix4<f32> a;
- float d = 0.005;
- a.buildRotateFromTo(v3f(0,1,0), v3f(d,1,0));
+ a.buildRotateFromTo(v3f(0,1,0), v3f(d,1+d/2,0));
v3f p1 = p;
a.rotateVect(p1);
- a.buildRotateFromTo(v3f(0,1,0), v3f(d,1+d/2,d));
+ a.buildRotateFromTo(v3f(0,1,0), v3f(d,1,d));
v3f p2 = p;
a.rotateVect(p2);
- a.buildRotateFromTo(v3f(0,1,0), v3f(0,1,d));
+ a.buildRotateFromTo(v3f(0,1,0), v3f(0,1-d/2,d));
v3f p3 = p;
a.rotateVect(p3);
p.rotateXYBy(wicked_time_of_day * 360 - 90);