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

This commit is contained in:
2019-12-03 10:55:21 +00:00
parent 844173d571
commit c38678056d
7 changed files with 14 additions and 12 deletions

View File

@@ -258,9 +258,9 @@ 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(QVector3D(0,0,-1), 1);//, dir0(light->dir0), dir1(light->dir1);
pos = m * pos;
dir = (m * QVector4D(l->direction(),0)).normalized();//((m * dir) - pos).normalized();
dir = (m * QVector4D(QVector3D(0,0,-1),0)).normalized();//((m * dir) - pos).normalized();
so.position = pos;
so.direction = dir;
//so.shadowMatrix = l->shadow_matrix;