X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Flighting.cpp;fp=source%2Flighting.cpp;h=239bdc19d0d03fdb9d0bcfaf58902d4c12abf4f6;hp=d1fd9a70ffc0febe50bd9335b753c87418e32549;hb=50a0c7fd661fe6bfa3f929ad66e47cfab4a0fb87;hpb=d147aa8f56e6a60d80f628ffeedf16bc99b588d3 diff --git a/source/lighting.cpp b/source/lighting.cpp index d1fd9a70..239bdc19 100644 --- a/source/lighting.cpp +++ b/source/lighting.cpp @@ -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