`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 ·