`screen_coords_to_world_pos` and SSAA
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 2.2k
- Forks
- 242
- Ø Merge
- 11 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
I am having trouble getting screen_coords_to_world_pos to work with SSAA on:
import numpy as np
import polyscope as ps
import polyscope.imgui as psim
pos = np.array([[-1, 0, 0], [1, 0, 0], [0, 1, 0]])
vtx = [[0, 1, 2]]
ps.init()
ps.register_surface_mesh("tri", pos, vtx)
ps.set_ground_plane_mode("none")
def callback():
io = psim.GetIO()
screen_coords = io.MousePos
world_pos = ps.screen_coords_to_world_position(screen_coords)
if np.all(np.isfinite(world_pos)):
psim.TextUnformatted("Hover!")
#ps.set_SSAA_factor(4)
ps.set_user_callback(callback)
ps.show()
Without SSAA, the above runs fine, the label correctly appears when the mouse hovers the triangle. This is no longer the case when the line #ps.set_SSAA_factor(4) is uncommented (or enabled in UI).
Is there a transformation that needs to be applied to the screen_coords with SSAA enabled?
Incidentally, picking seems to work fine, as in the native "Selection" box shows the correct info when clicking on the triangle.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Führe die bereitgestellte Python-Reproduktion mit deaktiviertem und aktiviertem SSAA aus, beginnend bei screen_coords_to_world_position und set_SSAA_factor. Vergleiche deren Koordinatenverarbeitung mit dem nativen Selection-Pfad, der laut Bericht weiterhin funktioniert. Als abgeschlossen gilt die Aufgabe, wenn screen_coords_to_world_position bei aktiviertem SSAA endliche Positionen über dem Dreieck zurückgibt, sodass das Hover-Label erscheint.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, python
- Bereich
- api, computer-graphics
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100