Skip to content

Commit

Permalink
Improve VR video quality on platforms not using layers (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed Nov 27, 2018
1 parent 9cf66ae commit f88f5cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/src/main/cpp/VRVideo.cpp
Expand Up @@ -118,13 +118,12 @@ struct VRVideo::State {
}

vrb::TogglePtr createSphereProjection(bool half, device::EyeRect aUVRect) {
const int kCols = 30;
const int kRows = 30;
const float kRadius = 20.0f;
const int kCols = 70;
const int kRows = 70;
const float kRadius = 10.0f;

vrb::CreationContextPtr create = context.lock();
vrb::VertexArrayPtr array = vrb::VertexArray::Create(create);


for (float row = 0; row <= kRows; row+= 1.0f) {
const float alpha = row * (float)M_PI / kRows;
Expand Down Expand Up @@ -158,6 +157,7 @@ struct VRVideo::State {

vrb::RenderStatePtr state = vrb::RenderState::Create(create);
state->SetLightsEnabled(false);
state->SetFragmentPrecision(GL_HIGH_FLOAT);
vrb::TexturePtr texture = std::dynamic_pointer_cast<vrb::Texture>(window->GetSurfaceTexture());
state->SetTexture(texture);
vrb::GeometryPtr geometry = vrb::Geometry::Create(create);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/vrb

0 comments on commit f88f5cf

Please sign in to comment.