Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Improve VR video quality on platforms not using layers #853

Merged
merged 1 commit into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/main/cpp/VRVideo.cpp
Original file line number Diff line number Diff line change
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