mirror of
https://github.com/overte-org/overte.git
synced 2025-08-12 11:34:15 +02:00
Getting closer to a solution
This commit is contained in:
parent
4acbb81413
commit
7b6033f7bc
3 changed files with 3 additions and 7 deletions
|
@ -78,6 +78,7 @@ public:
|
||||||
auto srcViewFrustum = args->getViewFrustum();
|
auto srcViewFrustum = args->getViewFrustum();
|
||||||
srcViewFrustum.setPosition(_position);
|
srcViewFrustum.setPosition(_position);
|
||||||
srcViewFrustum.setOrientation(_orientation);
|
srcViewFrustum.setOrientation(_orientation);
|
||||||
|
srcViewFrustum.setProjection(glm::perspective(45.0f, ((float)args->_viewport.z / (float)args->_viewport.w), 0.1f, 100.0f));
|
||||||
// Without calculating the bound planes, the secondary camera will use the same culling frustum as the main camera,
|
// Without calculating the bound planes, the secondary camera will use the same culling frustum as the main camera,
|
||||||
// which is not what we want here.
|
// which is not what we want here.
|
||||||
srcViewFrustum.calculate();
|
srcViewFrustum.calculate();
|
||||||
|
|
|
@ -420,8 +420,7 @@ model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
|
||||||
void PreparePrimaryFramebuffer::run(const RenderContextPointer& renderContext, gpu::FramebufferPointer& primaryFramebuffer) {
|
void PreparePrimaryFramebuffer::run(const RenderContextPointer& renderContext, gpu::FramebufferPointer& primaryFramebuffer) {
|
||||||
|
|
||||||
auto framebufferCache = DependencyManager::get<FramebufferCache>();
|
auto framebufferCache = DependencyManager::get<FramebufferCache>();
|
||||||
auto framebufferSize = framebufferCache->getFrameBufferSize();
|
glm::uvec2 frameSize(renderContext->args->_viewport.z, renderContext->args->_viewport.w);
|
||||||
glm::uvec2 frameSize(framebufferSize.width(), framebufferSize.height());
|
|
||||||
|
|
||||||
// Resizing framebuffers instead of re-building them seems to cause issues with threaded
|
// Resizing framebuffers instead of re-building them seems to cause issues with threaded
|
||||||
// rendering
|
// rendering
|
||||||
|
|
|
@ -133,12 +133,8 @@
|
||||||
parentID: camera,
|
parentID: camera,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
position: { x: 0.007, y: 0.15, z: -0.005 },
|
position: { x: 0.007, y: 0.15, z: -0.005 },
|
||||||
dimensions: { x: 0.16, y: -0.16 * windowAspectRatio / previewAspectRatio, z: 0 }
|
dimensions: { x: 0.16, y: 0.16 * windowAspectRatio / previewAspectRatio, z: 0 }
|
||||||
// FIXME: This stretches the preview.
|
// FIXME: This stretches the preview.
|
||||||
// FIXME: We shouldn't need the negative dimension.
|
|
||||||
// e.g., This isn't necessary using an ordinary .jpg with lettering, above.
|
|
||||||
// Must be something about the view frustum projection matrix?
|
|
||||||
// But don't go changing that in (c++ code) without getting all the way to a desktop display!
|
|
||||||
});
|
});
|
||||||
Entities.editEntity(camera, { position: cameraPosition, rotation: cameraRotation });
|
Entities.editEntity(camera, { position: cameraPosition, rotation: cameraRotation });
|
||||||
setDisplay(monitorShowsCameraView);
|
setDisplay(monitorShowsCameraView);
|
||||||
|
|
Loading…
Reference in a new issue