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

Fix curved-display density mismatch #1380

Merged
merged 1 commit into from
Jul 9, 2019
Merged
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
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