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

Commit

Permalink
Fix curved-display density mismatch (#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and philip-lamb committed Jul 9, 2019
1 parent 0d7468e commit 3cf5764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/cpp/Widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ struct Widget::State {
cylinder->GetTextureSize(textureWidth, textureHeight);

const float radius = cylinder->GetCylinderRadius();
const float surfaceWidth = (float)textureWidth / placement->density * placement->textureScale;
const float surfaceHeight = (float)textureHeight / placement->density * placement->textureScale;
const float surfaceWidth = (float)textureWidth / (placement->density * placement->textureScale);
const float surfaceHeight = (float)textureHeight / (placement->density * placement->textureScale);
// Cylinder density measures the pixels for a 360 cylinder
// Oculus recommends 4680px density, which is 13 pixels per degree.
const float theta = (float)M_PI * surfaceWidth / (cylinderDensity * 0.5f);
Expand Down

0 comments on commit 3cf5764

Please sign in to comment.