git-svn-id: svn://db.shs.com.ru/libs@617 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -228,9 +228,9 @@ void setUniformLight(QOpenGLShaderProgram * prog, Light * light, QString ulightn
|
||||
if (!prog) return;
|
||||
if (!prog->isLinked()) return;
|
||||
QMatrix4x4 m = mat * light->worldTransform();
|
||||
QVector4D pos(0, 0, 0, 1.), dir(light->direction);//, dir0(light->dir0), dir1(light->dir1);
|
||||
QVector4D pos(0, 0, 0, 1.), dir(light->direction, 1);//, dir0(light->dir0), dir1(light->dir1);
|
||||
pos = m * pos;
|
||||
dir = (mat * dir).normalized();
|
||||
dir = ((m * dir) - pos).normalized();
|
||||
float ang_start = light->angle_start / 2.f, ang_end = light->angle_end / 2.f;
|
||||
if (light->light_type == Light::Omni)
|
||||
ang_start = ang_end = 180.;
|
||||
|
||||
Reference in New Issue
Block a user