git-svn-id: svn://db.shs.com.ru/libs@59 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -68,10 +68,13 @@ void RendererDeferredShading::renderScene() {
|
||||
QMatrix4x4 mviewproji = (mview * mproj).inverted();
|
||||
rp.prev_proj_matrix = prev_proj;
|
||||
rp.prev_view_matrix = prev_view;
|
||||
corner_dirs[0] = (QVector4D(-1, -1, 1, 1) * rp.viewproj_matrix).normalized();
|
||||
corner_dirs[1] = (QVector4D( 1, -1, 1, 1) * rp.viewproj_matrix).normalized();
|
||||
corner_dirs[2] = (QVector4D( 1, 1, 1, 1) * rp.viewproj_matrix).normalized();
|
||||
corner_dirs[3] = (QVector4D(-1, 1, 1, 1) * rp.viewproj_matrix).normalized();
|
||||
QMatrix4x4 vc_proji;
|
||||
vc_proji.perspective(90., 1., view.camera().depthStart(), view.camera().depthEnd());
|
||||
vc_proji = vc_proji.inverted();
|
||||
corner_dirs[0] = (mproji * QVector4D( 1, 1, 0, 1));
|
||||
corner_dirs[1] = (mproji * QVector4D(-1, 1, 0, 1));
|
||||
corner_dirs[2] = (mproji * QVector4D(-1, -1, 0, 1));
|
||||
corner_dirs[3] = (mproji * QVector4D( 1, -1, 0, 1));
|
||||
//qDebug() << corner_dirs[0] << corner_dirs[1] << corner_dirs[2] << corner_dirs[3];
|
||||
fbo_g.bind();
|
||||
int buffs[] = {0, 1, 2, 3, 4};
|
||||
@@ -179,7 +182,7 @@ void RendererDeferredShading::renderScene() {
|
||||
glBindTexture(GL_TEXTURE_2D, fbo_out.colorTexture(ri));
|
||||
fbo_out.setWriteBuffer(wi);
|
||||
setupDSLights(l, mview);
|
||||
glDrawQuad(shader_ds_1);
|
||||
glDrawQuad(shader_ds_1, corner_dirs);
|
||||
//break;
|
||||
}
|
||||
//fbo_out.release();
|
||||
|
||||
Reference in New Issue
Block a user