git-svn-id: svn://db.shs.com.ru/libs@637 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -36,9 +36,9 @@ void GLRendererBase::setupLight(const Light & l, int inpass_index, int gl_index)
|
||||
GLfloat pos[] = {0.f, 0.f, 0.f, 0.f};
|
||||
GLfloat dir[] = {0.f, 0.f, 0.f};
|
||||
GLfloat col[] = {0.f, 0.f, 0.f};
|
||||
pos[0] = l.light_type == Light::Directional ? -l.direction.x() : lp.x();
|
||||
pos[1] = l.light_type == Light::Directional ? -l.direction.y() : lp.y();
|
||||
pos[2] = l.light_type == Light::Directional ? -l.direction.z() : lp.z();
|
||||
pos[0] = l.light_type == Light::Directional ? -l.direction().x() : lp.x();
|
||||
pos[1] = l.light_type == Light::Directional ? -l.direction().y() : lp.y();
|
||||
pos[2] = l.light_type == Light::Directional ? -l.direction().z() : lp.z();
|
||||
pos[3] = l.light_type == Light::Directional ? 0. : 1.;
|
||||
dir[0] = ld.x();
|
||||
dir[1] = ld.y();
|
||||
@@ -209,7 +209,7 @@ void GLRendererBase::renderShadow(Light * l, QOpenGLShaderProgram * prog, QMatri
|
||||
Camera cam;
|
||||
QVector3D wp = l->worldPos();
|
||||
cam.setPos(wp);
|
||||
cam.setAim(wp + (l->worldTransform() * QVector4D(l->direction)).toVector3D());
|
||||
cam.setAim(wp + (l->worldTransform() * QVector4D(l->direction())).toVector3D());
|
||||
cam.setDepthStart(view->camera()->depthStart());
|
||||
cam.setDepthEnd(view->camera()->depthEnd());
|
||||
cam.setFOV(l->angle_end);
|
||||
|
||||
Reference in New Issue
Block a user