git-svn-id: svn://db.shs.com.ru/libs@637 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-01 16:52:10 +00:00
parent 09298fadcd
commit 385070f70f
33 changed files with 226 additions and 83 deletions

View File

@@ -258,7 +258,7 @@ void RendererBase::reloadLightsPositions(Camera * cam) {
QGLLightPosition & so(cur_lights_pos_[i]);
Light * l = current_lights[i];
QMatrix4x4 m = mat * l->worldTransform();
QVector4D pos(0, 0, 0, 1.), dir(l->direction, 1);//, dir0(light->dir0), dir1(light->dir1);
QVector4D pos(0, 0, 0, 1.), dir(l->direction(), 1);//, dir0(light->dir0), dir1(light->dir1);
pos = m * pos;
dir = ((m * dir) - pos).normalized();
so.position = pos;