History

Fix the curvature issue in stereo by evaluating in the mono clip space, not stereo. INtegrate the scattering in simple ambient without IBL

samcake committed 10 years ago

Commit d128af41 parent 197d49f17 files · +231 −28Browse files

Showing the changes to libraries/render-utils/src/DeferredFrameTransform.cpp (1 of 17 files). Show all

Unified · Split

libraries/render-utils/src/DeferredFrameTransform.cpp+3−4
@@ -36,13 +36,12 @@ void DeferredFrameTransform::update(RenderArgs* args) { · 35 unmodified lines
3636 cameraTransform.getMatrix(frameTransformBuffer.invView);
3737 cameraTransform.getInverseMatrix(frameTransformBuffer.view);
3838
39+ args->getViewFrustum().evalProjectionMatrix(frameTransformBuffer.projectionMono);
40+
3941 // Running in stero ?
4042 bool isStereo = args->_context->isStereo();
4143 if (!isStereo) {
42− // Eval the mono projection
43− mat4 monoProjMat;
44− args->getViewFrustum().evalProjectionMatrix(monoProjMat);
45− frameTransformBuffer.projection[0] = monoProjMat;
44+ frameTransformBuffer.projection[0] = frameTransformBuffer.projectionMono;
4645 frameTransformBuffer.stereoInfo = glm::vec4(0.0f, (float)args->_viewport.z, 0.0f, 0.0f);
4746 frameTransformBuffer.invpixelInfo = glm::vec4(1.0f / args->_viewport.z, 1.0f / args->_viewport.w, 0.0f, 0.0f);
4847 } else {