RectLight: textured light under a non-uniform scale samples and looks up the texture with the unscaled size
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 57/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
Read lib/rendering/pbr/light/RectLight.cc and Light.cc, especially RectLight::update(), updateParamAndTransforms(), and updateTransforms(). Reproduce the mismatch with a textured RectLight scaled by (2, 1, 1) and compare light-only with BSDF-only sampling. Done means both sampling paths agree for the scaled textured light, as they do for the unscaled equivalent.
索引モデルが issue の本文から書いたものです。
説明
Summary. A textured RectLight whose node_xform scales it non-uniformly samples and looks up its texture with the unscaled size: light sampling and BSDF sampling disagree. Without the texture, or without the scale, both agree. Version 2026.29.1, scalar mode.
Reproduce. Diffuse floor, RectLight with width 1, height 1, a texture, scale(2, 1, 1) in node_xform, max_depth 1:
| light | light_samples only |
bsdf_samples only |
|---|---|---|
| width 1, scale(2, 1, 1), textured | 0.0907 | 0.0715 |
| width 2, no scale, textured | 0.0892 | 0.0891 |
Cause. RectLight::update() (lib/rendering/pbr/light/RectLight.cc) sets mHalfWidth/mHalfHeight from the attributes and passes them by value to updateParamAndTransforms() (Light.cc). That function first calls updateTransforms(), which for a non-uniform scale multiplies mWidth/mHeight (and mHalfWidth/mHalfHeight) by the scale, and then builds the texture uv mapping (getScaleOffset) from the stale, unscaled values it was given. So sample() maps uv in [0, 1] to the middle part of the light only, while reporting the density of the whole area, and intersect() gives uv outside [0, 1] on the outer parts.
Fix (untested). Compute the uv mapping after updateTransforms(), e.g. pass the scaled half sizes, or set the uv scale and offset from the members after the call.
- 主要言語
- CMake
- スター
- 4.7k
- フォーク
- 321
- 平均マージ
- 13分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenMoonRay/openmoonray のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
OpenMoonRay/openmoonray#332 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
OpenMoonRay/openmoonray#320 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
OpenMoonRay/openmoonray#233 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
OpenMoonRay/openmoonray#330 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
OpenMoonRay/openmoonray#329 ·
OpenMoonRay/openmoonray の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
rive-app/rive-runtime#143 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug: get_image_info returns true after copying an uninitialised buffer into the caller's output when every UDIM tile is unreadable対応中かも @lgritz が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AcademySoftwareFoundation/OpenImageIO#5662 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
bug studies ui
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
userFRM/egui-charts#2236 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#132 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信