RectLight: textured light under a non-uniform scale samples and looks up the texture with the unscaled size
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 57/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- computer-graphics
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- CMake
- Estrellas
- 4.7k
- Forks
- 321
- Merge medio
- 13 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenMoonRay/openmoonray
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
OpenMoonRay/openmoonray#332 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
OpenMoonRay/openmoonray#320 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
OpenMoonRay/openmoonray#233 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
OpenMoonRay/openmoonray#330 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
OpenMoonRay/openmoonray#329 ·
Todos los issues de OpenMoonRay/openmoonray
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
rive-app/rive-runtime#143 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug: get_image_info returns true after copying an uninitialised buffer into the caller's output when every UDIM tile is unreadablePosiblemente ocupada @lgritz la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
AcademySoftwareFoundation/OpenImageIO#5662 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
bug studies ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
userFRM/egui-charts#2236 ·
Los mantenedores suelen responder en 1 día
-
贡献 UGREEN 绿联 DVD+R 标定参数Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#132 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día