removed extraneous code for hmd

This commit is contained in:
Anna 2019-06-26 17:27:53 -07:00
parent 6f5b37ec87
commit 24b6d64e34
5 changed files with 10 additions and 24 deletions

View file

@ -905,7 +905,7 @@ OpenGLDisplayPlugin::~OpenGLDisplayPlugin() {
void OpenGLDisplayPlugin::updateCompositeFramebuffer() {
auto renderSize = glm::uvec2(getRecommendedRenderSize());
if (!_compositeFramebuffer || _compositeFramebuffer->getSize() != renderSize) {
_compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("OpenGLDisplayPlugin::composite", gpu::Element::COLOR_RGBA_32, renderSize.x, renderSize.y));
_compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("OpenGLDisplayPlugin::composite", gpu::Element::COLOR_SRGBA_32, renderSize.x, renderSize.y));
}
}

View file

@ -174,10 +174,6 @@ float HmdDisplayPlugin::getLeftCenterPixel() const {
return leftCenterPixel;
}
gpu::PipelinePointer HmdDisplayPlugin::getRenderTexturePipeline() {
return _drawTexturePipeline;
}
void HmdDisplayPlugin::internalPresent() {
PROFILE_RANGE_EX(render, __FUNCTION__, 0xff00ff00, (uint64_t)presentCount())

View file

@ -56,17 +56,19 @@ void main(void) {
} else if (toneCurve == ToneCurveReinhard) {
tonedColor = srcColor/(1.0 + srcColor);
tonedColor = pow(tonedColor, vec3(INV_GAMMA_22));
} else if (toneCurve == ToneCurveNone) {
// For debugging purposes, we may want to see what the colors look like before the automatic OpenGL
// conversion mentioned above, so we undo it here
tonedColor = pow(srcColor, vec3(GAMMA_22));
} else {
// toneCurve == ToneCurveGamma22
}
else if (toneCurve == ToneCurveGamma22) {
// We use glEnable(GL_FRAMEBUFFER_SRGB), which automatically converts textures from RGB to SRGB
// when writing from an RGB framebuffer to an SRGB framebuffer (note that it doesn't do anything
// when writing from an SRGB framebuffer to an RGB framebuffer).
// Since the conversion happens automatically, we don't need to do anything in this shader
}
}
else {
// toneCurve == ToneCurveNone
// For debugging purposes, we may want to see what the colors look like before the automatic OpenGL
// conversion mentioned above, so we undo it here
tonedColor = pow(srcColor, vec3(GAMMA_22));
}
outFragColor = vec4(tonedColor, 1.0);
}

View file

@ -124,15 +124,6 @@ void OculusDisplayPlugin::uncustomizeContext() {
Parent::uncustomizeContext();
}
gpu::PipelinePointer OculusDisplayPlugin::getRenderTexturePipeline() {
//return _SRGBToLinearPipeline;
return _drawTexturePipeline;
}
gpu::PipelinePointer OculusDisplayPlugin::getCompositeScenePipeline() {
return _SRGBToLinearPipeline;
}
static const uint64_t FRAME_BUDGET = (11 * USECS_PER_MSEC);
static const uint64_t FRAME_OVER_BUDGET = (15 * USECS_PER_MSEC);

View file

@ -24,9 +24,6 @@ public:
virtual QJsonObject getHardwareStats() const;
virtual gpu::PipelinePointer getRenderTexturePipeline() override;
virtual gpu::PipelinePointer getCompositeScenePipeline() override;
protected:
QThread::Priority getPresentPriority() override { return QThread::TimeCriticalPriority; }