[Bug] - N8AO works incorrectly with adaptiveDpr
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- react, three.js, typescript
- 领域
- frontend, performance, web-dev
调研方向
从 issue 中描述的 N8AOPostPass 行为开始,并在列出的 react-postprocessing 和 three 设置中将 renderer DPR 从 2 更改为 1,以复现该情况。跟踪其 size 值如何更新;完成的标准是 DPR 转换后 adaptiveDpr 不再产生异常反射。
由索引模型根据 Issue 内容生成。
描述
Hey everyone! I seems found a bug in N8AO related to AdaptiveDpr
We found a strange effect in our application after adding N8AO to EffectComposer - sometimes it started to add weird 'reflections' to the materials, and we couldn't understand where it's coming from
This is how it looks like: On the surface of the model you can see "reflection" from grid, which should't be present (but it's not only about grid but any objects can appear as reflection).
After debugging for a while I've noticed that this happens on my machine when DPR value is changed. If we (or system) change dpr from 2 to 1, N8AO started to add this 'reflections'. As I can see class has size values which are half of the initial renderer size (if I understand correctly)
If I manually call setSize(width, height) method on N8AOPostPass instance and upscale this values back to dpr=2 values this bug disappears. So it's either should always keep initial values or there is some error in calculation after updating render size
Steps to reproduce
Lest say screen size is 1000x500 with dpr=2. initial values of renderer is 2000x1000px, dpr=2, we set dpr to 1, values are updated to 1000x500, bug appears. If I set values manually by calling setSize() on N8AOPostPass instance to setSize(2x1000, 2x500) it starts working correctly again
versions
"@react-three/drei": "^9.97.5",
"@react-three/fiber": "^8.15.16",
"@react-three/postprocessing": "^2.16.2",
"postprocessing": "^6.35.3",
"three": "^0.161.0",
Can anyone help with this? I can help with fix if you can explain a bit more of how it works. Thanks in advance
- 主要语言
- TypeScript
- 星标
- 1.4k
- 派生
- 134
- 平均合并
- 4 分钟
- 30 天内合并 PR
- 4
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pmndrs/react-postprocessing 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 42/100
pmndrs/react-postprocessing#343 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
pmndrs/react-postprocessing#286 ·
-
enhancement
pmndrs/react-postprocessing#253 · 4 个 reaction · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 25/100
pmndrs/react-postprocessing#240 · 1 条评论 · 1 个 reaction ·
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
pmndrs/react-postprocessing#183 ·
查看 pmndrs/react-postprocessing 的全部 Issue
相似的 Issue
-
comp/dashboard P3 type/bug
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
难度 2/5 1-3 小时 新手友好度 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 76/100
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·