RectLight: textured light under a non-uniform scale samples and looks up the texture with the unscaled size
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- computer-graphics
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- CMake
- Stelle
- 4.7k
- Fork
- 321
- Merge medio
- 13m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenMoonRay/openmoonray
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
OpenMoonRay/openmoonray#332 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
OpenMoonRay/openmoonray#320 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
OpenMoonRay/openmoonray#233 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
OpenMoonRay/openmoonray#330 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
OpenMoonRay/openmoonray#329 ·
Tutte le issue di OpenMoonRay/openmoonray
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 83/100
rive-app/rive-runtime#143 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
bug: get_image_info returns true after copying an uninitialised buffer into the caller's output when every UDIM tile is unreadableForse già presa @lgritz l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AcademySoftwareFoundation/OpenImageIO#5662 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
bug studies ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
userFRM/egui-charts#2236 ·
I maintainer di solito rispondono entro 1 giorno
-
贡献 UGREEN 绿联 DVD+R 标定参数Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#132 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno