`screen_coords_to_world_pos` and SSAA
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 領域
- api, computer-graphics
研究方向
執行提供的 Python 重現,在停用和啟用 SSAA 的情況下分別進行,並從 screen_coords_to_world_position 和 set_SSAA_factor 開始。將其座標處理方式與原生的 Selection 路徑進行比較,報告稱後者仍然正常運作。完成標準是:啟用 SSAA 時,screen_coords_to_world_position 在三角形範圍內回傳有限位置,讓懸停標籤顯示。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- C++
- 星號
- 2.2k
- 分支
- 242
- 平均合併
- 11 分鐘
- 30 天內合併 PR
- 1
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nmwsharp/polyscope 的其他 Issue
-
難度 5/5 一週以上 新手友好度 35/100
-
難度 3/5 1-2 天 新手友好度 48/100
-
難度 5/5 一週以上 新手友好度 30/100
-
Rust Version 未關閉
難度 5/5 一週以上 新手友好度 15/100
-
enhancement
難度 5/5 一週以上 新手友好度 20/100
查看 nmwsharp/polyscope 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
gazebosim/gz-sensors#662 · 1 則留言 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 76/100
-
comp-datalake
難度 2/5 1-3 小時 新手友好度 88/100
ClickHouse/ClickHouse#121222 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
LadybirdBrowser/ladybird#12123 ·