]> git.tdb.fi Git - libs/gl.git/blobdiff - source/lighting.cpp
Adapt to the new vector/matrix slicing API in mspmath
[libs/gl.git] / source / lighting.cpp
index d1fd9a70ffc0febe50bd9335b753c87418e32549..239bdc19d0d03fdb9d0bcfaf58902d4c12abf4f6 100644 (file)
@@ -62,7 +62,7 @@ void Lighting::update_shader_data(ProgramData &shdata, const Matrix &view_matrix
 {
        shdata.uniform("ambient_color", ambient);
        shdata.uniform("sky_color", sky_color);
-       shdata.uniform("eye_sky_dir", Vector3(view_matrix*Vector4(sky_direction, 0.0f)));
+       shdata.uniform("eye_sky_dir", view_matrix.block<3, 3>(0, 0)*sky_direction);
        shdata.uniform("horizon_limit", horizon_angle.radians());
 
        for(unsigned i=0; i<lights.size(); ++i)