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

Improve depth sorting: do not clamp hitPoint used for ndc calculation #1887

Merged
merged 1 commit into from
Sep 26, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) {
aPlacement.anchorX = 0.0f;
aPlacement.anchorY = 0.0f;
aPlacement.translationY = WidgetPlacement.dpDimension(getContext(), R.dimen.video_projection_menu_translation_y);
aPlacement.translationZ = 30.0f;
aPlacement.translationZ = 2.0f;
}

public void setParentWidget(UIWidget aParent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ public void run() {
mLibraryNotification.getPlacement().parentHandle = getHandle();
mLibraryNotification.getPlacement().anchorY = 0.0f;
mLibraryNotification.getPlacement().translationX = (offsetViewBounds.left + mBookmarksButton.getWidth() / 2.0f) * ratio;
mLibraryNotification.getPlacement().translationY = ((offsetViewBounds.top - 66) * ratio);
mLibraryNotification.getPlacement().translationZ = 38.0f;
mLibraryNotification.getPlacement().translationY = ((offsetViewBounds.top - 60) * ratio);
mLibraryNotification.getPlacement().translationZ = 25.0f;
mLibraryNotification.getPlacement().density = 3.0f;
mLibraryNotification.setText(R.string.bookmarks_saved_notification);
mLibraryNotification.setCurvedMode(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) {
aPlacement.anchorX = 0.0f;
aPlacement.anchorY = 0.0f;
aPlacement.translationY = WidgetPlacement.dpDimension(getContext(), R.dimen.video_projection_menu_translation_y);
aPlacement.translationZ = 30.0f;
aPlacement.translationZ = 2.0f;
}

public void setParentWidget(UIWidget aParent) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/cpp/BrowserWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,9 +1398,9 @@ BrowserWorld::ComputeNormalizedZ(const vrb::NodePtr& aNode) const {
bool inside = false;
float distance;
if (target->GetQuad()) {
target->GetQuad()->TestIntersection(headPosition, headDirection, hitPoint, normal, true, inside, distance);
target->GetQuad()->TestIntersection(headPosition, headDirection, hitPoint, normal, false, inside, distance);
} else if (target->GetCylinder()) {
target->GetCylinder()->TestIntersection(headPosition, headDirection, hitPoint, normal, true, inside, distance);
target->GetCylinder()->TestIntersection(headPosition, headDirection, hitPoint, normal, false, inside, distance);
}

const vrb::Matrix& projection = m.device->GetCamera(device::Eye::Left)->GetPerspective();
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/dimen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

<!-- Video Projection Menu -->
<dimen name="video_projection_menu_width">330dp</dimen>
<dimen name="video_projection_menu_translation_y">15dp</dimen>
<dimen name="video_projection_menu_translation_y">7dp</dimen>

<!-- Brightness Menu -->
<dimen name="brightness_menu_width">150dp</dimen>
Expand Down