From 56475820de60f6ca1075ad77ea92efd6ec843784 Mon Sep 17 00:00:00 2001 From: krauthaufen Date: Wed, 10 Apr 2024 10:08:58 +0200 Subject: [PATCH] [Rendering.PointSet] fixed y-flipped picking --- RELEASE_NOTES.md | 3 +++ src/Aardvark.Rendering.PointSet/LodTreeSceneGraph.fs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 31f098d4..e74fefde 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +### 5.3.7 +- [Rendering.PointSet] fixed y-flipped picking + ### 5.3.6 - [Rendering.PointSet] fixed picking for non-compute runtimes (OpenGL on MacOS) diff --git a/src/Aardvark.Rendering.PointSet/LodTreeSceneGraph.fs b/src/Aardvark.Rendering.PointSet/LodTreeSceneGraph.fs index b14fed3e..c15d9b01 100644 --- a/src/Aardvark.Rendering.PointSet/LodTreeSceneGraph.fs +++ b/src/Aardvark.Rendering.PointSet/LodTreeSceneGraph.fs @@ -152,7 +152,7 @@ module Readback = let pixel = V2i(pixel.X, size.Y - 1 - pixel.Y) let tc = (V2d pixel + V2d.Half) / V2d size - let ndc = V3d(tc.X * 2.0 - 1.0, 1.0 - 2.0 * tc.Y, z) + let ndc = V3d(tc.X * 2.0 - 1.0, 2.0 * tc.Y - 1.0, z) V4f(V3f ndc, Vec.distance (V2f pixel) (V2f center)) ) |> ignore