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

This commit is contained in:
2015-12-02 13:53:02 +00:00
parent b8aad27b56
commit 86c101eb79
11 changed files with 83 additions and 30 deletions

View File

@@ -238,6 +238,7 @@ void GLRendererBase::renderShadow(Light * l, QGLShaderProgram * prog, QMatrix4x4
cam.setDepthEnd(view.camera().depthEnd());
cam.setFOV(l->angle_end);
cam.apply(1.);
view.objects_.preparePos(cam);
RenderingParameters rpl;
rpl.pass = GLObjectBase::Solid;
rpl.shaders = prog;
@@ -247,7 +248,7 @@ void GLRendererBase::renderShadow(Light * l, QGLShaderProgram * prog, QMatrix4x4
QMatrix4x4 mbias;
mbias.scale(0.5, 0.5, 0.5);
mbias.translate(1., 1., 1.);
l->shadow_matrix = mbias*rpl.proj_matrix*rpl.view_matrix*mat;//;// * mbias;
l->shadow_matrix = mbias*rpl.proj_matrix*rpl.view_matrix;//*mat;
//qDebug() << mbias;
//glPushMatrix();
renderSingleShadow(view.objects_, rpl);